]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Fix double use of mail directory in parsemail-batch.sh
authorDaniel Axtens <dja@axtens.net>
Wed, 8 Feb 2017 04:16:58 +0000 (15:16 +1100)
committerStephen Finucane <stephen@that.guru>
Wed, 8 Feb 2017 09:25:30 +0000 (09:25 +0000)
2d142b2c0a27 ("bin: Run scripts through shellcheck") changes an
ls to a find. find output includes the directory name, unlike ls.
This breaks the script, because it prepends the mail directory
later on.

Remove the prepending in the script - leave it exclusively to find.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: stephen@that.guru
Fixes: 2d142b2c0a27 ("bin: Run scripts through shellcheck")
patchwork/bin/parsemail-batch.sh

index 8536791035959182cd3ace7a1177b166c734aec7..d42712ed099507c10cee0539b7696a47ca78a478 100755 (executable)
@@ -40,5 +40,5 @@ shift
 find "$mail_dir" -maxdepth 1 |
 while read -r line; do
     echo "$line"
-    "$BIN_DIR/parsemail.sh" "$@" < "$mail_dir/$line"
+    "$BIN_DIR/parsemail.sh" "$@" < "$line"
 done