Symlinks to files *always* getting detected as updated remote files

Advertisement

tsreyb
Joined:
Posts:
1
Location:
Andover, MA US

Symlinks to files *always* getting detected as updated remote files

This question is specific to symlinks to *files*, not directories. I know there are some advanced settings for symlinks to directories, but I haven't been able to find any settings about how symlinks to files are processed. Anyway, here is my situation..

I've been using WinSCP (currently using 5.95 but my question applies to previous versions as well) on Win7 to synchronize over 80,000 files from a linux host to my PC using SFTP (w/pageant for authentication).

I use binary transfers with both 'modification time' and 'file size' comparison criteria enabled. I also enable Transfer Settings > Common options > 'preserve timestamp' and 'calculate total size'

On linux I have a few hundred symlinks to files. WinSCP *always* detects these symlinks as having been modified and, hence, are always listed in my 'preview changes' window. <== *That* is the problem; the hundreds of symlink files clutter my preview changes window making it tedious to preview what winscp is about to do.

Most of these links are not typically modified, yet winscp wants to copy them. Every time. For example, on linux I have a regular file 'b' and a link to it named 'm'..

-rwxr-xr-x 1 tsreyb staff 2187 Jan 11 12:02 b
lrwxrwxrwx 1 tsreyb staff   18 Jan 18 14:58 m -> /home/tsreyb/bin/b

Once the sync is finished, the two files on my Win7 machine have the same timestamp and filesize..

01/11/2017  01:02 PM             2,187 b
01/11/2017  01:02 PM             2,187 m

I can see two reasons why winscp thinks the link has been updated:

[A] The symlink's timestamp on linux reflects the time the link was created, not the time the regular file was created or modified. Thus the link's timestamp is usually not the same as the timestamp of it linked file.

This, in conjunction with the fact that winscp (apparently) copies the *contents* of the file to my local copy of link 'm', and gives it a timestamp equal to that of the regular file, means that every time I attempt a sync it looks as if the symlink truly has been updated.

[B] The actual filesize of a symlink on linux isn't the same as the filesize of the file to which it points. These values are almost certainly different. Hence it always looks to winscp as if the symlink has been modified, and, hence, by the rules of the filesize comparison criteria, winscp believes the symlink file to have been modified.

While this isn't a huge deal, it is an annoyance. I was wondering if there's a configuration I can change that would avoid this situation?

I really don't need the symlinks copied over at all. If there is a way to ignore them, that would solve my problem.

Reply with quote

Advertisement

Erik Krause
Joined:
Posts:
4

This applies to local symlinked files as well. They always show up and are compared as 0 KB and the creation date of the symlink.

If the file the symlink points to is updated locally this isn't recognized by WinSCP. Most of the time the remote file is newer than the symlink and the local file is overwritten in case of a sync, which is a major annoyance.

Tested on Win 7 and Win 10 with WinSCP 5.11.1 and previous versions, Commander interface and Synchronization.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,552
Location:
Prague, Czechia

Erik Krause wrote:

This applies to local symlinked files as well. They always show up and are compared as 0 KB and the creation date of the symlink.

If the file the symlink points to is updated locally this isn't recognized by WinSCP. Most of the time the remote file is newer than the symlink and the local file is overwritten in case of a sync, which is a major annoyance.

Tested on Win 7 and Win 10 with WinSCP 5.11.1 and previous versions, Commander interface and Synchronization.
Thanks for your report.
This is a very different issue.
We will see, if more people ask for this.

Reply with quote

Advertisement

You can post new topics in this forum