From cf7b932fc4ab37b813414f53701bd0911b0808f5 Mon Sep 17 00:00:00 2001 From: Jocelyn Le Sage Date: Sat, 15 Jul 2017 21:06:09 -0400 Subject: [PATCH] Ignore hidden files/folders in watch directory. --- rootfs/etc/services.d/autovideoconverter/run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/services.d/autovideoconverter/run b/rootfs/etc/services.d/autovideoconverter/run index c98a3fb..4322415 100755 --- a/rootfs/etc/services.d/autovideoconverter/run +++ b/rootfs/etc/services.d/autovideoconverter/run @@ -29,7 +29,7 @@ log() { } WATCHDIR_HASH_calculate() { - find /watch -follow -type f -printf '%T@:%s:%p\n' | md5sum | cut -d' ' -f1 + find /watch -follow -type f -not -path '*/\.*' -printf '%T@:%s:%p\n' | md5sum | cut -d' ' -f1 } WATCHDIR_HASH_isset() { @@ -139,7 +139,7 @@ while true; do WATCHDIR_HASH_update log "Processing watch folder..." FILELIST="$(mktemp)" - find /watch -follow -type f > "$FILELIST" + find /watch -follow -type f -not -path '*/\.*' > "$FILELIST" while read -u 3 FILE do process_file "$FILE"