This forum uses cookies. Click X button to hide this message. What is stored? 
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sftp sync dirs fails to detect file diff if ignore date on

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.56(a)/7.57 bug reports (English) Printable version
View previous topic :: View next topic  
Author Message
fgnievinski
Junior Member
Junior Member


Joined: 09 Nov 2011
Posts: 10

PostPosted: Wed Nov 09, 2011 8:46 pm    Post subject: sftp sync dirs fails to detect file diff if ignore date on Reply with quote

put the two files below using the same name in separate dirs of the local hard drive; synchronize dirs is able to detect their difference, regardless of ignore date option.

using the sftp plugin, upload one of the files to a server; now the synchronize dirs fails to detect their difference if the ignore date option is on.

notice that the two files have different size, so totalcmd should be able to tell they are different.

-------- save this as dir1/structinit.m:
function out = structinit (in, val)
if (nargin < 2), val = []; end
out = structfun(@(f) val, in, 'UniformOutput',false);
end

-------- save this as dir2/structinit.m:
function out = structinit (in, val)
if (nargin < 2), val = []; end
out = structfun(@(f) val, 'UniformOutput',false);
end
Back to top
View user's profile Send private message
fgnievinski
Junior Member
Junior Member


Joined: 09 Nov 2011
Posts: 10

PostPosted: Wed Nov 09, 2011 9:18 pm    Post subject: Reply with quote

More info: the above refers to the native SFTP plugin available at ghisler dot com; using the one available from berlios dot de works with no problem.
Back to top
View user's profile Send private message
fgnievinski
Junior Member
Junior Member


Joined: 09 Nov 2011
Posts: 10

PostPosted: Wed Nov 09, 2011 9:56 pm    Post subject: Reply with quote

I'm sorry, I take that back: it fails with both sftp plugins -- would that indicate it's not a problem specific to any plugin, rather having origin in tc itself?
Thanks.
Back to top
View user's profile Send private message
Sob
Power Member
Power Member


Joined: 19 Jan 2005
Posts: 900

PostPosted: Thu Nov 10, 2011 2:46 am    Post subject: Reply with quote

When I try with your files (SFTP is in right panel; 1 = left file is older, 2 = left file is newer):
Code:
Asym. By cont. Ign.Date  SFTP1 SFTP2 Local1 Local2
 OFF    OFF      OFF      <-    ->     <-    ->
 OFF    OFF      ON       !=    !=     !=    !=
 OFF    ON       OFF      <-    ->     <-    ->
 OFF    ON       ON       ?     ?      !=    !=
 ON     OFF      OFF            ->           ->
 ON     OFF      ON       !=    !=     !=    !=
 ON     ON       OFF            ->           ->
 ON     ON       ON       ?     ?      !=    !=

The only difference I see is when both by content and ignore date are selected. Is it what you mean? It's partly understandable, because TC is not downloading whole files to really compare them by content. But when they clearly differ in size, I think they should be marked as different, i.e. != instead of ?.
Back to top
View user's profile Send private message Send e-mail
karlchen
Power Member
Power Member


Joined: 06 Feb 2003
Posts: 4503
Location: Germany

PostPosted: Thu Nov 10, 2011 5:52 am    Post subject: Reply with quote

Hi, folks.

This thread reads much as if it is about the same question / issue / problem as this thread: sftp plugin - synchronize dirs not working.

Cheers,
Karl
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 33961
Location: Switzerland

PostPosted: Thu Nov 10, 2011 9:35 am    Post subject: Reply with quote

What does the sync tool show, a question mark [?] or equal sign "="?
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fgnievinski
Junior Member
Junior Member


Joined: 09 Nov 2011
Posts: 10

PostPosted: Thu Nov 10, 2011 12:11 pm    Post subject: Reply with quote

TC shows an equal sign with a "TXT" label on top of it. And it recognizes that the file size on the LHS is 139 bytes and on the RHS is 135 bytes. My point is that the difference in file sizes should be sufficient for TC to recognize the files as different.

Now, this is interesting: the file size difference is exactly four bytes, which is also the number of lines in the files. Could it be that TC is assuming the difference is being caused by the newline breaker -- LF in unix, CR+LF in Windows -- thus ignoring it?

In the sample files I gave, that assumption would be unwarranted, because there is a genuine file content difference unrelated to newline breakers.
Back to top
View user's profile Send private message
Sob
Power Member
Power Member


Joined: 19 Jan 2005
Posts: 900

PostPosted: Thu Nov 10, 2011 4:11 pm    Post subject: Reply with quote

It's actually a feature, check the following thread:

Synchronisation over FTP misses changed files in text mode
Back to top
View user's profile Send private message Send e-mail
fgnievinski
Junior Member
Junior Member


Joined: 09 Nov 2011
Posts: 10

PostPosted: Thu Nov 10, 2011 5:23 pm    Post subject: Reply with quote

OK, I'll file a feature request elsewhere.
Back to top
View user's profile Send private message
fgnievinski
Junior Member
Junior Member


Joined: 09 Nov 2011
Posts: 10

PostPosted: Thu Nov 10, 2011 5:23 pm    Post subject: Reply with quote

The icon with TXT on top of an equal sign is hard to spot when the majority of files are equal.
Back to top
View user's profile Send private message
Lefteous
Power Member
Power Member


Joined: 08 Feb 2003
Posts: 9361
Location: Germany

PostPosted: Thu May 11, 2017 7:28 am    Post subject: Reply with quote

I know it's an old thread but all I get just is '?' as result with 'compare by content' and 'ignore dates' checked. I'm using TC 9.0a and sftp 1.42. When I compare those files the resulting msgbox says files are identical.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 33961
Location: Switzerland

PostPosted: Mon May 15, 2017 7:45 am    Post subject: Reply with quote

You get a '?' because compare by content isn't supported yet for file system plugins. This will be in the next version. I have already implemented it for sftp! It will call md5sum, sha1sum, sha256sum or sha512sum directly on the server, depending on what the server supports. At the same time, TC will calculate the corresponding checksum for the local file, and then compare the two.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.56(a)/7.57 bug reports (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group