From 80929d25ed1ddb007a823052213239ae399fb6cd Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Mon, 16 May 2016 09:55:56 -0400 Subject: [PATCH] Only look at .torrent files in the bash implementation --- hoarder.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hoarder.sh b/hoarder.sh index 7dd3093..5c58787 100755 --- a/hoarder.sh +++ b/hoarder.sh @@ -261,7 +261,7 @@ while true; do # check if the path is a directory if [[ -d "${file}" ]]; then # enumerate the directory - for sub_file in `find "${file}" -type f`; do + for sub_file in `find "${file}" -type f -name '*.torrent'`; do # this is the furthest we will descend if [[ -f "${sub_file}" ]]; then # get the torrent hash for the .torrent file @@ -278,7 +278,7 @@ while true; do fi done # check that the path is a file - elif [[ -f "${file}" ]]; then + elif [[ -f "${file}" ]] && echo "${file}" | egrep -q '\.torrent$'; then # get the torrent hash for the .torrent file torrent_hash=`get_torrent_hash "${file}"` if [[ ! $? ]]; then