examples/move_downloads.sh: Ignore size 0 files
This commit is contained in:
parent
19e34c1904
commit
9925f12675
@ -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
|
#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"
|
INCOMING="$1"
|
||||||
|
stat -c"%s" "$INCOMING" | grep -q "^0$" && exit
|
||||||
#ignore partial downloads (.part in firefox, .crdownload in chrome)
|
#ignore partial downloads (.part in firefox, .crdownload in chrome)
|
||||||
echo "$INCOMING" | grep -q .part$ && exit
|
echo "$INCOMING" | grep -q .part$ && exit
|
||||||
echo "$INCOMING" | grep -q .crdownload$ && exit
|
echo "$INCOMING" | grep -q .crdownload$ && exit
|
||||||
|
Loading…
Reference in New Issue
Block a user