fix: pos media sync finds nothing when the source dir is a symlink
gates / consistency-and-conventions (push) Successful in 54s
gates / consistency-and-conventions (push) Successful in 54s
GNU find (default -P) does not descend a command-line symlink to a directory, so `find $HOME/Music ...` returned zero files and the tool reported '0 added, 0 updated, 0 unchanged' without creating the target. Switch to `find -H` (follows only command-line symlinks; inner-symlink semantics unchanged).
This commit is contained in:
+1
-1
@@ -128,7 +128,7 @@ while IFS= read -r f; do
|
||||
else
|
||||
unchanged=$((unchanged + 1))
|
||||
fi
|
||||
done < <(find "$SRC" "${find_expr[@]}" | sort)
|
||||
done < <(find -H "$SRC" "${find_expr[@]}" | sort)
|
||||
|
||||
if [ "$DRY_RUN" -eq 1 ]; then
|
||||
echo "DRY RUN — nothing copied. Would sync: ${added} new, ${updated} updated, ${unchanged} unchanged → $dest_root"
|
||||
|
||||
Reference in New Issue
Block a user