Topic "live-sync bug: recognizes change but does nothing"

Author Message
epp_b

Guest


It's pretty much that simple: sometimes, when I run a "keep remote directory update date", it will say in the log, a "Change in 'DRIVE:\path\to\dir' detected'", but will fail to actually duplicate that change in the remote directory.

It seems to happen more when the remote connection is very fast and/or when it's watching for changes in very few directories.

This bug has been persistent as far back as I can remember using WinSCP and up to the latest version.

Just ask if you need any more information.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
The reason may be that with FTP and SCP protocol, the precision of remote file timestamps may be in minutes only. Hence any change within a minute after the last change may not be noticed.
_________________
Martin Prikryl
epp_b

Guest


I see. That makes sense. Would it be possible to add an option to synchronize the timestamps while keeping a directory up-to-date so that this problem does not occur?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
epp_b wrote:
I see. That makes sense. Would it be possible to add an option to synchronize the timestamps while keeping a directory up-to-date so that this problem does not occur?

Sorry, I do not understand. How and when do you want to synchronize timestamps?
_________________
Martin Prikryl
epp_b

Guest


Whenever a file gets uploaded, update the timestamp on the file as well.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
epp_b wrote:
Whenever a file gets uploaded, update the timestamp on the file as well.

Of local or remote file? Sorry I still do not understand how this would help. But maybe it is just misunderstanding on how the "keep to to date" functionality works.
_________________
Martin Prikryl
epp_b

Guest


Er, sorry. The remote file, of course (when uploading the local file, set the remote file to the same "last modified" as the local file)
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
epp_b wrote:
Er, sorry. The remote file, of course (when uploading the local file, set the remote file to the same "last modified" as the local file)

That's what WinSCP do. But it does not remember that value and retrieves again the remote directory listing, where precision is limited.
_________________
Martin Prikryl
epp_b

Guest


OK, I think understand the technical limitation.

Having said that: does the trigger to upload a file during this process rely on a local file being changed *and* the local file's timestamp being later than the corresponding remote file's timestamp? If so, could you add an option to "Ignore Remote Timestamp" when using the live-sync option?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
epp_b wrote:
Having said that: does the trigger to upload a file during this process rely on a local file being changed *and* the local file's timestamp being later than the corresponding remote file's timestamp? If so, could you add an option to "Ignore Remote Timestamp" when using the live-sync option?

Yes I can, but it is not that easy. The "change notification" from Windows notifies about a change in a particular directory, not in a particular file. Hence WinSCP needs to find out which file it was. The simple way is to compare local timestamps against remote one. But it does not work for you.

BTW, what protocol are you using? Can you switch to SFTP?
_________________
Martin Prikryl
epp_b

Guest


Quote:
Yes I can, but it is not that easy. The "change notification" from Windows notifies about a change in a particular directory, not in a particular file. Hence WinSCP needs to find out which file it was. The simple way is to compare local timestamps against remote one. But it does not work for you.

Ah, so you would need to develop a caching system of some sort in order for this to work. I understand the technical overhead this issue, then.

Quote:
BTW, what protocol are you using? Can you switch to SFTP?

This happens with any protocol (FTP, SFTP or SCP), but it's more frequent with FTP.

Unfortunately, this server does not support SFTP and I don't have shell access for the username that I use to connect.

Thanks.
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