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

+6
View File
@@ -244,6 +244,12 @@ Generic Functions
- `LITE_FOPT_RSYNC_DELETE (0x01)`
- `LITE_FOPT_KEEP_MTIME (0x02)`
- `LITE_FOPT_RSYNC_LINKS (0x04)`
Symlinks in the source tree are followed by default, the destination
gets a copy of what they point to. With `LITE_FOPT_RSYNC_LINKS` a
symlink to a file, or a dangling symlink, is recreated in the
destination instead. Symlinks to directories are always followed.
In releases prior to v2.0 the argument controlling pruning was called
`delete`, it is now called `opt`. The APIs are 100% compatible if the