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