live-sync bug: recognizes change but does nothing

Advertisement

epp_b
Guest

live-sync bug: recognizes change but does nothing

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,802
Location:
Prague, Czechia

Re: live-sync bug: recognizes change but does nothing

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

Reply with quote

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?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,802
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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,802
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

Reply with quote

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)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,802
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

Reply with quote

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,802
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

Reply with quote

epp_b
Guest

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.

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.

Reply with quote

Advertisement

You can post new topics in this forum