summaryrefslogtreecommitdiff
path: root/libpod/driver/driver.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-14 22:34:40 +0200
committerGitHub <noreply@github.com>2019-08-14 22:34:40 +0200
commitbf9e801f1182009dcd73443755690dafdc99eeb4 (patch)
treee594807f08b5d6018fc479e5fc1c3d39cdfd4958 /libpod/driver/driver.go
parentf5dcb8011df1f8c7dd501e2ee1db9e069135fba9 (diff)
parentbc6e1f11366945d15d96e0fc1854b5b9c5e18ee7 (diff)
downloadpodman-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
Diffstat (limited to 'libpod/driver/driver.go')
-rw-r--r--libpod/driver/driver.go4
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,