fix unmount issus when dir is not mount #1

Open
Izimic wants to merge 1 commits from Izimic/rootfs-wip:master into master
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ class RootFS::RootFS
def unmount(directory = nil)
if directory
execute "umount '#{@directory}/#{directory}'"
execute "mountpoint -q '#{@directory}/#{directory}' || exit 0 && umount '#{@directory}/#{directory}'"
return
end