No announcement yet.

Filename case respected when option is off - Mint 18.1 Serena MATE

  • Filter
  • Time
  • Show
Clear All
new posts

  • Filename case respected when option is off - Mint 18.1 Serena MATE

    First, I'm in a platform conversion from XP to Ubuntu Mint 18.2 Serena with the MATE desktop. BC4 is 32 bit Version 4.1.9 (build 21719). BC4 is running native Linux, not under Wine.

    (I'm comparing files from my old windows Local Settings folder to the Local Setting folder used by Wine. For some XP program that will run under Wine, I am updating options for the Wine version to match the old XP version. Wine is NOT part of this problem. It's just reason file names differ in case.)

    In the attached screen shot, the old XP volume is /dev/mnt/c/... and the Wine emulator volume is /home/jared/.wine/...

    One application saved its Spamihalitor.ini file as a mix case name on the windows volume. When run under Wine, it saved its spamihalitor.ini file as all lower case.

    I expected BC4 to ignore the case difference and line up the two files. They were not aligned.

    So, I opened the Rules dialog to check the "Compare filename case" option. It was not set, which I believe means "ignore case".

    But just in case I was wrong, I check the option and refreshed and the files still did not line up. (This is what I consider correct behavior.)

    1. Am I doing anything wrong?

    2. If this might be a problem, what debug info do you want to see?

    Attached Files
    Last edited by jmthomas; 27-Jan-2017, 01:20 PM. Reason: fix link

  • #2

    The Comparison tab in the session settings controls if two aligned items with a difference in case are considered equal or different (similar to difference in timestamp, size, etc). But this does not control if it aligns, just if the aligned items should mark as a difference.

    Alignment is controlled by the file system on each side and if it considers character case important. Linux to Linux would not align items with different case, since they can potentially have both items in the same folder. Windows to Windows would align the items. Either OS to FTP is controlled by an option in the FTP Profile.

    You can use our Align command (right click menu) to override an alignment to any other, or define an Alignment Override in the Session Settings dialog -> Misc tab (Pro only feature) using Regular Expressions. There is not an easy RegEx to match arbitrary character case at any position, however, but if you wanted to experiment you can run the trial mode to test out this feature:

    On Linux, the BC4Key.txt you need to rename/delete to revert to the trial is usually in your user's home directory in a hidden /.config/beyondcompare folder or /.bcompare, depending on your OS/version.
    Aaron P Scooter Software


    • #3
      Thank you.

      If I understand correctly, the "Compare filename case" setting generally would be useful only for BC running Windows, because it's the underlaying OS that drives the decision for BC to ignore case. Running under all other systems, the names would not be aligned (i.e. my situation) and therefore "compare filename case" would never be consulted.

      This brings up a point about how to identify a "Windows" system when making the alignment decision. A way to treat NTFS volumes (and/or FATxx) as coming from a windows system, regardless of what OS BC is running under, would be very useful for people like me.

      Would you consider an enhancement (option) where the file system, not the OS, determines if character case is important?

      (This might be a single list with check boxes for each file system lists. Or, 2 lists of "respect" and "ignore" file systems, primed based on the underlaying OS, where the user can move names between the lists. The list could be static common systems (ext_, jfs, nfs, ntfs, ...), or a list dynamically obtained from the OS.)


      • #4
        Thinking some more, an easy way might be to add another option like "Align filenames with different UNICODE...".

        Call it "Try to align filenames regardless of case".

        When checked,

        Tag each mixed case name with side (right, left), lower cased name, and unique ID. Sort by lower cased name. Now select each group of matching lower cased names.

        Group size is 1 -- name appears unaligned (i.e. orphan file).
        Group size is 2 -- names appear aligned (mixed case names may or may not match)
        Group size > 2 -- need to "mix'n match" names to align.

        1. Add tags to each item in the group with the number of positions that differ between the mix case and lower case names, then the position of the first mismatch in case. Resort group by total differences, first different position, mixed case name.

        2. Go through the sorted group, selecting the first item tagged left side and the first tagged right side, and remove the two from the group. These 2 names appear aligned.

        3. Repeat step 2 until you run out of names from one side or the other.

        4. All remaining names are appear unaligned.
        Last edited by jmthomas; 28-Jan-2017, 12:50 AM.


        • #5

          We do have a Customer Wishlist entry on the subject, and I've updated it with your ideas and suggestions. While our wishlist is not currently scheduled development, it is a place our developers go for ideas when looking for new features or enhancing areas of the application.
          Aaron P Scooter Software


          • #6
            I should add that we do look at the file system per folder, so the mounted NTFS would be case insensitive. However, if aligned to a folder that is case sensitive (extfs), then that comparison is still case sensitive since at least one side is.
            Aaron P Scooter Software