From d939c56fef11199a71b176952fb5f0abb954632d Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Mon, 15 Nov 2021 23:12:01 -0500 Subject: [PATCH] Use -e instead of -f when checking for existence so this can be used to mount stuff in /dev --- cryptobox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptobox b/cryptobox index 76c4671..ad3290a 100755 --- a/cryptobox +++ b/cryptobox @@ -139,7 +139,7 @@ function mount_image { mountpoint="$2" # Exit with an error if either the image file or mount point do not exist - [[ ! -f "$filename" ]] && error_exit "${c_m}$filename${c_w} does not exist" + [[ ! -e "$filename" ]] && error_exit "${c_m}$filename${c_w} does not exist" [[ -e "$mountpoint" ]] || error_exit "${c_m}$mountpoint${c_w} does not exist" [[ -d "$mountpoint" ]] || error_exit "${c_m}$mountpoint${c_w} is not a directory"