From d8fb3e855d1d6ce14e1a70754320f26319266e52 Mon Sep 17 00:00:00 2001 From: Charles Prost Date: Thu, 19 Mar 2015 10:42:29 +0100 Subject: [PATCH] [fix] Support filenames with space for 'blackbox_shred_all_files' --- bin/blackbox_shred_all_files | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/blackbox_shred_all_files b/bin/blackbox_shred_all_files index 8825319..aa0c995 100755 --- a/bin/blackbox_shred_all_files +++ b/bin/blackbox_shred_all_files @@ -21,14 +21,18 @@ source "${blackbox_home}/_blackbox_common.sh" change_to_vcs_root +OLDIFS=$IFS + echo '========== FILES BEING SHREDDED:' -for i in $(<"$BB_FILES") ; do - unencrypted_file=$(get_unencrypted_filename "$i") - encrypted_file=$(get_encrypted_filename "$i") +while IFS= read <&99 -r unencrypted_file; do + unencrypted_file=$(get_unencrypted_filename "$unencrypted_file") + encrypted_file=$(get_encrypted_filename "$unencrypted_file") if [[ -f "$unencrypted_file" ]]; then echo " $unencrypted_file" shred_file "$unencrypted_file" fi -done +done 99<"$BB_FILES" + +IFS=$OLDIFS echo '========== DONE.'