From 9925f126752ee9a3246190cfed06cc5b22db92cc Mon Sep 17 00:00:00 2001 From: Albert S Date: Fri, 21 Aug 2020 11:07:31 +0200 Subject: [PATCH] examples/move_downloads.sh: Ignore size 0 files --- examples/move_downloads.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/move_downloads.sh b/examples/move_downloads.sh index 52918eb..f888d06 100755 --- a/examples/move_downloads.sh +++ b/examples/move_downloads.sh @@ -4,6 +4,7 @@ #adhocify -d -m IN_CLOSE_WRITE -m IN_MOVED_TO -w /home/user/Downloads -w /home/user/other_dir /path/to/move_downloads.sh INCOMING="$1" +stat -c"%s" "$INCOMING" | grep -q "^0$" && exit #ignore partial downloads (.part in firefox, .crdownload in chrome) echo "$INCOMING" | grep -q .part$ && exit echo "$INCOMING" | grep -q .crdownload$ && exit