Use LastWriteTimeUtc when files have the exact same length#34
Use LastWriteTimeUtc when files have the exact same length#34manu-st wants to merge 1 commit intosshnet:masterfrom
Conversation
This is to better see if files are different or not while waiting for the MD5 implementation. This is not bullet proof but better than what exists today.
|
@manu-silicon |
|
There is LastWriteTime which would work for those platforms. Since this is just trying to copy files that have been changed while keeping the same size, it might still work better than not copying them at all. In any case the proposed PR is not a full solution. I would actually rather always copy the files rather than trying to be smart as this is very hard to fix from the client side. |
|
Maybe a better way would be allow passing a |
|
Some sftp servers, for instance DoveTail Co:Z SFTP (On z/OS mainframe), does not support MD5, gives only an approximate file length and gives a timestamp that is NOT equal to LastWriteTime(It is the last access time instead). The reasons for this are, as far as I know, technical limitations on z/OS. So in that scenario the only sensible file comparison during synchronization is on filename, unfortunately. For that reason I would suggest either the delegate of func as x2764tech suggested, or a SyncOption class/enum to specify behavior. |
|
@jenshenneberg maybe we could build in some default delegates: These could then be used like an enum: |
This is to better see if files are different or not while waiting
for the MD5 implementation. This is not bullet proof but better than
what exists today.
This is to address issue #33