Skip to content

Commit

Permalink
removMergeDir from inspect result if not mounted
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
QiWang19 committed Aug 13, 2019
1 parent ce64c14 commit bc6e1f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libpod/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit bc6e1f1

Please sign in to comment.