Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

#1705 CmdLine: First path ending with \ in quote marks combines

Branch_+_Trunk
closed-fixed
6
2008-05-27
2008-05-14
Yevgen
No

Winmerge can't support paths in command line paramters with spaces in quotes.

example:

winmerge "dir/d ir1/" dir/dir2

Discussion

  • Kimmo Varis

    Kimmo Varis - 2008-05-15

    Logged In: YES
    user_id=631874
    Originator: NO

    Can you please tell at least which version of WinMerge you have?

    Recent versions should be ok with command line handling. Though you should use "\" as path separator in Windows...

     
  • Yevgen

    Yevgen - 2008-05-17

    Logged In: YES
    user_id=1020707
    Originator: YES

    Winmerge version 2.8.0.0 Unicode
    OS: WinXP Prof

    I want to compare two directories
    if directory path had no spaces - no problem.
    Command line: winmerge D:\temp\test\dir2\ D:\temp\test\dir2\

    Other case:
    command line: winmerge "D:\temp\test\dir 1\" D:\temp\test\dir2\ winmerge can't recognize cmd arguments in this case.
    Please check attached screenshot.

    File Added: winmerge.png

     
  • Yevgen

    Yevgen - 2008-05-17

    Screenshot

     
  • Kimmo Varis

    Kimmo Varis - 2008-05-17

    Logged In: YES
    user_id=631874
    Originator: NO

    Thanks for the information.

    I briefly tested some paths with spaces in them. But couldn't see any problem.

    Then I created exactly same paths you have below (thanks!). If I write the paths like this:
    winmerge "D:\temp\test\dir 1" D:\temp\test\dir2
    there is no problem, but if I write the paths like this:
    winmerge "D:\temp\test\dir 1\" D:\temp\test\dir2\ WinMerge behaves like you describe.

    So the problem is in handling the last "\" in the path.

     
  • Kimmo Varis

    Kimmo Varis - 2008-05-17

    Logged In: YES
    user_id=631874
    Originator: NO

    Changing the summary, as this is not about spaces but firs path ending with \. That seems to confuse MFC library's parser.

     
  • Kimmo Varis

    Kimmo Varis - 2008-05-17
    • summary: Command line can't support path with spaces in "" --> CmdLine: First path ending with \ in parentheses combines
    • priority: 5 --> 6
     
  • Kimmo Varis

    Kimmo Varis - 2008-05-18
    • assigned_to: nobody --> kimmov
     
  • Kimmo Varis

    Kimmo Varis - 2008-05-18

    Original and altered file

     
  • Kimmo Varis

    Kimmo Varis - 2008-05-18

    Logged In: YES
    user_id=631874
    Originator: NO

    Ok, I have a patch for this bug. It is a workaround for bugs in MFC/Windows in handling command line parameters. It checks if there is parenthesis inside path WinMerge gets. If there is, it means there is two paths instead of one. Then we just split the path to two paths.

    File Added: FixCmdLine.zip

     
  • Kimmo Varis

    Kimmo Varis - 2008-05-19
    • milestone: --> Branch_+_Trunk
    • status: open --> open-fixed
     
  • Kimmo Varis

    Kimmo Varis - 2008-05-19

    Logged In: YES
    user_id=631874
    Originator: NO

    I've committed my fix to SVN trunk:
    Completed: At revision: 5347

    So the next experimental will have this bug fixed, and hopefully next stable release too (if no other problems are found).

     
  • Kimmo Varis

    Kimmo Varis - 2008-05-24
    • summary: CmdLine: First path ending with \ in parentheses combines --> CmdLine: First path ending with \ in quote marks combines
     
  • Kimmo Varis

    Kimmo Varis - 2008-05-24

    Logged In: YES
    user_id=631874
    Originator: NO

    Gah. Of course I meant quotation marks, not parentheses! Updating summary again.

     
  • Kimmo Varis

    Kimmo Varis - 2008-05-24

    Logged In: YES
    user_id=631874
    Originator: NO

    There was much older similar bug report I just closed:
    BUG: #1565867 WinMerge doesn't accept trailing "\" in command line paths
    http://winmerge.org/bug/1565867

     
  • Kimmo Varis

    Kimmo Varis - 2008-05-27
    • status: open-fixed --> closed-fixed
     
  • Kimmo Varis

    Kimmo Varis - 2008-05-27

    Logged In: YES
    user_id=631874
    Originator: NO

    Committed the fix to 2.8 branch:
    Completed: At revision: 5378

    The fix will be a part of 2.8.2 release.

     

Log in to post a comment.