mirror of https://github.com/containers/podman.git
removMergeDir from inspect result if not mounted
Remove GraphDriver.Data.MergedDir from the result of podman inspect if the container not mounte. Because the /var/lib/containers/.../merged directory is no longer created by default; it only exists during the scope of podman mount. Signed-off-by: Qi Wang <qiwan@redhat.com>
This commit is contained in:
parent
ce64c1403d
commit
bc6e1f1136
|
@ -38,6 +38,10 @@ func GetDriverData(store cstorage.Store, layerID string) (*Data, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if mountTimes, err := store.Mounted(layerID); mountTimes == 0 || err != nil {
|
||||||
|
delete(metaData, "MergedDir")
|
||||||
|
}
|
||||||
|
|
||||||
return &Data{
|
return &Data{
|
||||||
Name: name,
|
Name: name,
|
||||||
Data: metaData,
|
Data: metaData,
|
||||||
|
|
Loading…
Reference in New Issue