Topic "WinSCP doesn't check hardlink target date when synchronizing"

Author Message
ricardo37

Guest


I am synchronizing a directory in Windows 7 against a web server running on Linux. In Windows 7 I use hard links to point to some files outside the web directory. WinSCP correctly follows these hard links and copies the target files up to the server. But on subsequent synchronizations, WinSCP doesn't recognize that the local hard link target and the remote copy of it are already synchronized. Instead WinSCP constantly offers to re-copy the hard link target up to the server. Is there are way to get WinSCP to recognize that the local and remote files are already synchronized (i.e. to compare timestamps of the remote file and the hard link target, rather than of the remote file and the hard link itself)?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
I believe that hardlinks have the same timestamp as the file they point to. Or rather all hardlinks of the same file are equal.
_________________
Martin Prikryl
ricardo37

Guest


Sorry, a mistake in terminology. I meant a Windows symlink as opposed to a Windows shortcut. And I checked; the symlinks all definitely have different timestamps than the targets to which they point. So I rephrase my question: is there any way to get WinSCP sychronizations to check the date of the target rather than of the symlink itsef?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
ricardo37 wrote:
Sorry, a mistake in terminology. I meant a Windows symlink as opposed to a Windows shortcut. And I checked; the symlinks all definitely have different timestamps than the targets to which they point. So I rephrase my question: is there any way to get WinSCP sychronizations to check the date of the target rather than of the symlink itsef?

I do not believe Windows shortcuts are intended for tasks like that.
_________________
Martin Prikryl
sgakagiz

Guest


Hello Martin, he's not talking about a *.lnk file. Rather he's saying that windows 2000 and up has supported an implementation of unix's symlinks, and instead called them hard links. A program called junction link magic (explained here) can implement them much more easily than the command line. To download the program for your testing, you can find it at here or do a google search for it.

About the hard links:
In the file listing they show up with icons looking like shortcuts (with a green arrow in my case) except that you can browse through them like normal folders.

In WinSCP this is not noticed and these hard links look like a regular folder in WinSCP. However, he's saying that winSCP seems to assume that the files that you access through the hard link are not being picked up with the correct date. I've not noticed this myself, but I thought I'd clarify.

I'd appreciate if the icons for hard links were different, like the icon for a symlink on a remote server. In a command prompt such hard links are listed as '<junction>' in case that helps you with your testing
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License