Preserve Timestamp Staying Enabled for Synchronize

Advertisement

joe@lavalleassociates.com
Joined:
Posts:
2
Location:
New York

Preserve Timestamp Staying Enabled for Synchronize

I am unable to disable Preserve Timestamp in the Common Options or via C# code when using Synchronize. This seems to be a new issue that I have not seen before. I am running 5.17.8.
Even if I select transfer settings I have configured the Preserve Timestamp still stays enabled and I cannot uncheck.

Joe

Reply with quote

Advertisement

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

Re: Preserve Timestamp Staying Enabled for Synchronize

Can you please give us step-by-step instructions for reproducing the problem?

Btw, are you aware that the "Use same options next time" does not apply to the transfer settings? (and it never did) – That's why it's above the box.
See https://winscp.net/eng/docs/ui_synchronize#saving_options

Also I do not understand the relation to "C# code".

Reply with quote

joe@lavalleassociates.com
Joined:
Posts:
2
Location:
New York

Re: Preserve Timestamp Staying Enabled for Synchronize

Using the UI, when I synchronize I look at the default Transfer Options and the Preserve Timestamp is always checked and grey, even if I select or configure a different one and uncheck it does not persist.

My c# code has this specified but I think I am missing something as it will not respect the synOptions.PreserveTimestamp = false.. I get the errors below
SynchronizationResult synchronizationResult;
TransferOptions synOptions = new TransferOptions();
synOptions.FileMask = filemask;
synOptions.PreserveTimestamp = false;
 
synchronizationResult = session.SynchronizeDirectories(SyncMode, sourcefolder, destinationfolder, false, false, WinSCP.SynchronizationCriteria.Time, synOptions);
 
try
{
   synchronizationResult.Check();
   logfile.WriteLine(DateTime.Now + " : Remote Sync Result : {0}", synchronizationResult.ToString());
}
catch (Exception e)
{
   logfile.WriteLine(DateTime.Now + " : Error Obtaining Sync Result  : {0}", e.Message);
}
11/16/2020 10:17:46 AM : Error Obtaining Sync Result  : 
**Upload of file 'File11.20201112.1342.txt' was successful, but error occurred while setting the permissions and/or timestamp.
**

If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option.
The server does not support the operation.
Error code: 8
Error message from server (US-ASCII): SETSTAT unsupported

Reply with quote

Advertisement

You can post new topics in this forum