Remove "bind" code path from diff

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira
2023-04-03 08:11:35 -07:00
parent d373ebc4de
commit 6a5b4c9c24
3 changed files with 13 additions and 12 deletions

View File

@@ -148,6 +148,14 @@ func (m *Mount) GetParentPaths() ([]string, error) {
// Unmount the mount at the provided path
func Unmount(mount string, flags int) error {
if _, err := os.Stat(mount); err != nil {
if os.IsNotExist(err) {
return nil
}
return fmt.Errorf("failed to access mount point %s: %w", mount, err)
}
mount = filepath.Clean(mount)
adsFile := mount + ":" + sourceStreamName
var layerPath string