Announcement

Collapse
No announcement yet.

SFTP folder diff initially reports some identical files as different

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • SFTP folder diff initially reports some identical files as different

    I'm using BC 3.0.15 Pro on Windows to diff folders on two CentOS 5 servers. I'm connecting with SFTP, and BC's log window reports the following info for both servers:

    09/04/2009 21:35:59 Server software: OpenSSH_4.3
    09/04/2009 21:35:59 Using SFTP version 3.
    09/04/2009 21:35:59 Compression: none
    09/04/2009 21:35:59 Encryption: aes256-ctr
    09/04/2009 21:35:59 MAC algorithm: hmac-md5
    09/04/2009 21:35:59 Server information:

    My comparison settings are:

    Compare file size
    Compare timestamps
    Compare contents
    - CRC comparison
    Override quick test results

    When the folder view completes its compare, several lines show file pairs being different, with the =/= symbol in the central column.

    Yet when I double-click on these to open in file view, that view reports (correctly) that the files are identical.

    I get the same result if I change the "Compare contents" setting to "Binary".

    And if I add the CRC column to the folder view, the left and right sides show different CRCs, even though I know the files are identical (and that's confirmed when file viewer opens them).

    Using WinSCP I can see that my SFTP servers don't support calculation of file checksums, so presumably BC is computing these itself. But why does folder viewer believe these files are different when they're actually identical when file viewer examines them?

    John

  • #2
    Is it possible the files have different line terminator styles (Windows on one side, Unix/Linux on the other)? It might help to turn on "View > Show Whitespace" to see if the line terminators are different. You can also try comparing the files in the Hex Compare to see if there is a non-text difference in the files.
    Chris K Scooter Software

    Comment


    • #3
      That was it Chris. When BC transferred some of the files from one side to the other it changed the line terminators from UNIX to PC, even though both sides were on the same OS. Looking in FTP Profiles I discovered that the destination side was using the defaults on its Transfer tab (i.e. Transfer Type = Auto), but the source side was set to use Binary. Overriding the destination's setting and making it Binary too, then re-transferring the file, I now have UNIX terminators on both sides.

      In a situation like this where an FTP Profile applies to both sides of the folder view, how does BC decide whose Transfer settings to use when copying a file from one side to the other?

      John

      Comment


      • #4
        FYI - If you use a rules-based comparison instead of a binary comparison in your folder compare sessions, line-endings and encoding differences will not cause files to be considered different...although the CRC columm will still reflect that there is a formatting difference.
        BC v4.0.7 build 19761
        ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

        Comment


        • #5
          BC doesn't support transferring directly from one server to the other (FXP), so it uses both FTP profiles when doing the copy. One to do the conversion when downloading it to your computer and the other to do the upload to the other server.
          Zoë P Scooter Software

          Comment

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎