Make rsync() recreate symlinks only on request

Fixing LITE_FOPT_COPYFILE_SYM in copyfile() also changed rsync(), which
has always passed that flag.  Every caller would start getting links in
the destination where they used to get a copy of the file.

Keep following links by default and add LITE_FOPT_RSYNC_LINKS for
callers that want them recreated.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-14 12:46:48 +01:00
1 parent 666a8ef7cd
commit 4609c53ddd
5 files changed
+42 -12

No files matched your search

+7
View File
@@ -7,7 +7,14 @@ All notable changes to the project are documented in this file.
[UNRELEASED][]
--------------
### Changes
- Add `LITE_FOPT_RSYNC_LINKS` option to `rsync()`, recreates symlinks to
files in the destination instead of copying what they point to
### Fixes
- Fix #23: `copyfile()` ignored `LITE_FOPT_COPYFILE_SYM` and always
copied what a symlink points to. It now recreates the symlink, also
when it is dangling or points to a directory
- Fix `copyfile()` not preserving the source file mode when the process
umask is more restrictive
- Fix `mkpath()`, and `fmkpath()`, not applying the given mode when the