Announcement

Collapse
No announcement yet.

[Solution] Issue comparing files which have a single quote in filename

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Solution] Issue comparing files which have a single quote in filename

    I contacted scootersoftware a while ago via email

    Hi, support
    bcompare has issues, when using from commandline and filenames have ' inside (character 27h).

    Examples:

    ls -1N ds*.txt

    ds'1.txt
    ds'2.txt

    bcompare ds*.txt

    => message "/tmp/ds1.txt ds2.txt" not found

    ls -1N *songster*

    Queen - Don't Stop Me Now (songster 100907).gp5
    Queen - Don't Stop Me Now (songster 55950).gp5

    bcompare *songster*

    =>
    /.../bcompare-4.2.9.23626/bin/bcompare: -c: line 0: syntax error near unexpected token `('
    /.../bcompare-4.2.9.23626/bin/bcompare: -c: line 0: `exec -a /.../bcompare-4.2.9.23626/bin/bcompare /.../bcompare-4.2.9.23626/lib/beyondcompare/BCompare 'Queen - Don't Stop Me Now (songster 100907).gp5' 'Queen - Don't Stop Me Now (songster 55950).gp5' > /dev/null 2>&1'
    I also send a patch as solution, but I did not find it applied to the latest update. So I'll post it here for all Linux-Users to apply them to their local installation, until scooter will fix bcompare:
    Code:
    --- /usr/bin/bcompare    2019-11-21 21:03:31.000000000 +0100
    +++ /home/itsme/bin/bcompare    2020-01-04 10:05:21.717070446 +0100
    @@ -1,4 +1,4 @@
    -#!/bin/sh
    +#!/bin/bash
    
     BC_LIB=/usr/lib/beyondcompare
     export BC_LIB
    @@ -41,7 +41,7 @@
     # execute the program
     ARGS="";
     while [ "$#" -gt 0 ]; do
    -    ARGS=$ARGS" '$1'"
    +    ARGS=$ARGS" '${1//\'/\'\\\'\'}'"
         shift 1
     done
     /bin/bash -c "exec -a $0 $EXEC $ARGS > /dev/null 2>&1" $0

  • #2
    Thanks for posting. We did add this to our tracker to investigate a solution, but searching our email database, I do not see the code snippet here. I've appended that as well to our entry on the subject. For each release, our developers are working on a variety of scheduled fixes and features, and aren't able to tackle every open issue, but with these notes they'll be able to research it effectively when it is assigned.
    Aaron P Scooter Software

    Comment


    • #3
      Thank you for sharing the solution, this is fixed in Beyond Compare 4.3.4, now available on the download page.
      Chris K Scooter Software

      Comment

      Working...
      X