commit 713934aa06334013a4e64dd7f990ebbcb728eb70
parent a3286cf24a1de063c6465dc1fc220a59d75daa6c
Author: um.hau <tom.umhau@gmail.com>
Date: Mon, 7 May 2018 19:15:26 -0400
only request confirmation if the directory was not empty.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vmc b/vmc
@@ -118,7 +118,7 @@ else
current_number_of_recordings='0'
fi
-if [ $4 = '-newrecordings' ] && [ -d "$audio_folder" ]; then
+if [ $4 = '-newrecordings' ] && [ -d "$audio_folder" ] && [ "$(ls -A $audio_folder)" ]; then
echo -n "AUDIO already exists at this directory! Press [enter] to overwrite."; read
sudo rm -r $audio_folder; mkdir $audio_folder
fi