doublecmd/plugins
heredie 1fa52a2c70 FIX: SFTP - preserve symlinks when copying to remote and syncing
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.
2026-06-07 10:04:33 -06:00
..
dsx FIX: Everything - stop search 2025-06-25 21:16:52 +03:00
wcx FIX: Zip plugin - allow cancelling TAR archive packing mid-operation (#2874) 2026-05-23 12:12:23 +03:00
wdx UPD: Project files 2024-03-01 23:53:33 +03:00
wfx FIX: SFTP - preserve symlinks when copying to remote and syncing 2026-06-07 10:04:33 -06:00
wlx FIX: Explorer preview plugin compilation 2025-04-12 13:57:38 +03:00
build.bat UPD: Line-endings 2023-01-19 21:17:15 +03:00
build.sh ADD: SevenZip - install plugin under Linux (experimental) 2025-10-11 13:39:55 +03:00