diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-14 22:34:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-14 22:34:40 +0200 |
commit | bf9e801f1182009dcd73443755690dafdc99eeb4 (patch) | |
tree | e594807f08b5d6018fc479e5fc1c3d39cdfd4958 | |
parent | f5dcb8011df1f8c7dd501e2ee1db9e069135fba9 (diff) | |
parent | bc6e1f11366945d15d96e0fc1854b5b9c5e18ee7 (diff) | |
download | podman-bf9e801f1182009dcd73443755690dafdc99eeb4.tar.gz podman-bf9e801f1182009dcd73443755690dafdc99eeb4.tar.bz2 podman-bf9e801f1182009dcd73443755690dafdc99eeb4.zip |
Merge pull request #3807 from QiWang19/inspect_mergeDir
removMergeDir from inspect result if not mounted
-rw-r--r-- | libpod/driver/driver.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/driver/driver.go b/libpod/driver/driver.go index f9442fa21..85eda5a21 100644 --- a/libpod/driver/driver.go +++ b/libpod/driver/driver.go @@ -38,6 +38,10 @@ func GetDriverData(store cstorage.Store, layerID string) (*Data, error) { if err != nil { return nil, err } + if mountTimes, err := store.Mounted(layerID); mountTimes == 0 || err != nil { + delete(metaData, "MergedDir") + } + return &Data{ Name: name, Data: metaData, |