mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
When copying a local directory tree to an SFTP destination, symlinks
were silently converted to regular files. Three layered bugs:
1. uwfxplugincopyinoperation.pas: the tree builder used fsooslFollow,
resolving symlinks to their targets before StoreFile was called.
2. uwfxpluginutil.pas / ProcessLink: no else-branch for the no-subnode
case (fsooslDontFollow), leaving Result uninitialised.
3. sftpsend.pas / StoreFile: opened local path with TFileStreamEx which
follows symlinks; never tried to create a remote symlink.
Fix - copy:
- sftpsend.pas: detect symlinks via fpLStat/fpReadLink before opening.
Unlink any existing destination, then call libssh2_sftp_symlink to
recreate the link on the remote (rsync-like behaviour). Falls back to
content upload if the server refuses. Unix-only ({ UNIX}).
- uwfxplugincopyinoperation.pas: switch SymLinkOption to fsooslDontFollow.
- uwfxpluginutil.pas / ProcessLink: add else-branch for the no-subnode
case, routing the symlink node to ProcessFile.
Fix - sync comparison:
- sftpsend.pas / FsFindNextW: save the symlink's own attributes before
following the link target to detect directories; restore mtime, atime
and filesize afterwards (symlink filesize = byte length of target string).
- fsyncdirsdlg.pas / AreEquivalentLinks: when one side does not expose
the link target (e.g. WFX/SFTP plugin), fall back to size comparison.
- fsyncdirsdlg.pas / UpdateState: let AreEquivalentLinks override the
timestamp gate so symlinks compare as equal regardless of mtime.
|
||
|---|---|---|
| .. | ||
| dsx | ||
| wcx | ||
| wdx | ||
| wfx | ||
| wlx | ||
| build.bat | ||
| build.sh | ||