]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Fix: encrypt: BASEPATH evaluation when encrypting a folder
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 6 Jun 2022 14:14:44 +0000 (11:14 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 6 Jun 2022 14:14:44 +0000 (11:14 -0300)
lib/keyringer/actions/encrypt

index 1256374b2bac91f76f7b5b5f529680fcb20c3a13..f762f29ebf4bf872c8671cd25679ca381e593c49 100755 (executable)
@@ -93,7 +93,7 @@ fi
 # Encrypt
 if [ "$UNENCRYPTED_FILE" != "-" ] && [ -d "$UNENCRYPTED_FILE" ]; then
   # Time to go recursive
-  BASEPATH="`basename $FILE .asc`"
+  BASEPATH="`echo $FILE | sed -e 's/.asc$//'`"
   FILEPATH="`dirname "$UNENCRYPTED_FILE"`"
 
   if [ "$FILEPATH" == "." ]; then