From 6ae820e254861cf80fd8f5e717226cc2a68c83b7 Mon Sep 17 00:00:00 2001 From: Izimic Date: Fri, 1 Jan 2021 09:17:19 +0100 Subject: [PATCH] fix unmount issus when dir is not mount --- src/main.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cr b/src/main.cr index ba0ca32..28c7a74 100644 --- a/src/main.cr +++ b/src/main.cr @@ -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 -- 2.42.0