about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorjakanakae-envangel <jakanakaevangeli@chiru.no>2018-08-23 20:41:58 +0200
committerjakanakae-envangel <jakanakaevangeli@chiru.no>2018-08-23 20:41:58 +0200
commitb3ac23bc6aba2bbcc82eeeb032928bd97bc87db5 (patch)
tree9eb66f22554e6b9feec771d16900e9e0ebdb4466
parentb9eacb84a1fc013ec3903d230d12f846041f8108 (diff)
downloadranger-b3ac23bc6aba2bbcc82eeeb032928bd97bc87db5.tar.gz
scope.sh: Fix rm-ing a nonexistent file
For archive previews, if bsdtar failed to extract a 7z file, it would
attempt to rm the already removed IMAGE_CACHE_PATH file.
-rwxr-xr-xranger/data/scope.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh
index 29f4d718..27a527ca 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -158,7 +158,7 @@ handle_image() {
         #         rm -- "${IMAGE_CACHE_PATH}"
         #         return
         #     fi
-        #     # bsdtar and unzip need escaiping
+        #     # bsdtar and unzip need escaping.
         #     fne=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g')
         #     bsdtar --extract --to-stdout --file "${FILE_PATH}" "$fne" > \
         #         "${IMAGE_CACHE_PATH}" && exit 6
@@ -167,7 +167,7 @@ handle_image() {
         #         unrar p -p- -inul -- "${FILE_PATH}" "$fn" > "${IMAGE_CACHE_PATH}" && exit 6
         #     elif [ "$zip" ]; then
         #         unzip -pP "" -- "${FILE_PATH}" "$fne" > "${IMAGE_CACHE_PATH}" && exit 6
-        #     fi
+        #     else return; fi
         #     rm -- "${IMAGE_CACHE_PATH}"
         #     ;;
     esac