getFiles: better handling of path pruning
This commit is contained in:
parent
cc9ccc6dc5
commit
16f0d42335
@ -3,7 +3,7 @@ getFiles() {
|
||||
scantime=$(date +%s)
|
||||
for prune_expression in "${skippeddirectories[@]}"
|
||||
do
|
||||
prunes+="-path $sourcepath$prune_expression -prune -o "
|
||||
prunes+=( -path "$sourcepath$prune_expression" -prune -o )
|
||||
done
|
||||
(( cron )) || echo -n "Scanning $sourcepath... "
|
||||
# We probably have thousands of files, don't waste time on disk writes
|
||||
@ -56,7 +56,7 @@ getFiles() {
|
||||
fi
|
||||
progressSpin
|
||||
done < <(
|
||||
find "$sourcepath" $prunes -type f -printf "%T@ %s %P\n"
|
||||
find "$sourcepath" "${prunes[@]}" -type f -not -name '.*' -printf "%T@ %s %P\n"
|
||||
)
|
||||
echo 'COMMIT;' >&3
|
||||
(( cron )) || echo -n $'\r'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user