A bug in synchronizing the renamed files

Advertisement

Svyatoslav
Joined:
Posts:
5

A bug in synchronizing the renamed files

Hello,

I found a serious bug in the synchronize method, which prevents me from continuing using WinSCP.

The used command:

synchronize remote . -delete

Problem description:

Files, having equal names, don't synchronize.

How to reproduce the problem:

1) I have 6 images in the current directory with the names image1.png, image2.png, image3.png, image4.png, image5.png and image6.png.

2) I'm making synchronization:

synchronize remote . -delete

3) Ok

4) I remove image2.png on a local computer and restore the numeration from 1 to 5.

5) I already have 5 images in the current directory with the names image1.png, image2.png, image3.png, image4.png and image5.png

6) I'm making synchronization:
synchronize remote . -delete

7) There's a bug on a server: the image image2.png remained the same, the image image6.png was just removed instead.

Can I change the incorrect behavior of is it a real bug and I have to wait until it's fixed?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: A bug in synchronizing the renamed files

I'm not sure I understand the problem.
What did you expect WinSCP to do in this situation?
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: A bug in synchronizing the renamed files

Both your versions of image2.png have the same timestamp:

. 2019-01-18 11:14:58.202 Local file '.\image2.png' [1979-12-31T21:00:00.000Z] [49011] included to synchronization
...
. 2019-01-18 11:14:58.206 image2.png;-;11801;1979-12-31T21:00:00.000Z;3;"" [0];"" [0];---------;0

With the default settings, WinSCP consider these to be the same.

You would need to add "size" to the comparison to consider these files different:
synchronize remote . -delete -criteria=either
https://winscp.net/eng/docs/scriptcommand_synchronize#criteria

You should also consider using mirror mode: -mirror.
https://winscp.net/eng/docs/task_synchronize_full#mode

Reply with quote

Svyatoslav
Joined:
Posts:
5

Re: A bug in synchronizing the renamed files

synchronize remote . -delete -criteria=either
This command did not help. Attached a new log.
With the --mirror also does not work.

Reply with quote

Advertisement

Svyatoslav
Joined:
Posts:
5

Re: A bug in synchronizing the renamed files

Hello Martin,

Thank you for your help in solving the problem.

either and size criteria are really working. In my latest tests Windows Explorer set me back. It is not able to distinguish substituted files and cashes pictures' preview. Actual files are recorded on a disk at that time.

Reply with quote

Advertisement

You can post new topics in this forum