Menu

#61 Fix directory handling, & UNC paths, & shortnames

closed-accepted
None
5
2003-03-07
2003-03-02
No

This improves handling of some obscure cases in the
open dialog (root paths, relative paths, UNC paths).

It also converts arguments to long names (because the
directory context handler is passing short names).

Also, it preserves trailing slashes in the open dialog
edit boxes in some cases where we were dropping them.

One new resource -- a string for a message box for a
failure case from the OnOK -- I made it fail if the
current strings are not comparable (eg, one doesn't
exist, or they aren't the same type).

Discussion

  • Anonymous

    Anonymous - 2003-03-02

    OpenDlg., resource files, Merge.dsp, (new) paths.

     
  • Anonymous

    Anonymous - 2003-03-02

    Logged In: YES
    user_id=60964

    One new string resource: IDS_ERROR_INCOMPARABLE

    Two new source files (paths.cpp and paths.h).
    (So if you just add them to the dsp yourself, you don't need
    the dsp in the patch zip).

     
  • Kimmo Varis

    Kimmo Varis - 2003-03-02

    Logged In: YES
    user_id=631874

    Is '=' correct inside while or should it be '=='?

    // now walk down each directory
    // using CFileFind to get its long name
    while ((end = _tcschr(ptr, '\\')))

    Compiler gives warning, so if it is intentional, please add
    comment?

    Regards,
    Kimmo

     
  • Kimmo Varis

    Kimmo Varis - 2003-03-02

    Logged In: YES
    user_id=631874

    Forgot to mention that lines are from paths_GetLongPath()

     
  • Anonymous

    Anonymous - 2003-03-02

    Logged In: YES
    user_id=60964

    (Yep, intentional.)

    Strange; I didn't notice a warning (although, as we're using
    the same dsp file, that probably was my error in not
    noticing it).

    I thought the extra parentheses were enough to shut off that
    warning; that is show we always suppressed it before. But
    anyway, another, even clearer but longer, workaround to
    suppress it is

    while (0 != (end = _tcschr(ptr, '\\')))

     
  • Kimmo Varis

    Kimmo Varis - 2003-03-05

    Logged In: YES
    user_id=631874

    With this patch, WinMerge fails to open paths like:
    \\server\dir1\dir2\dir3\dir4\dir5\

    If I remove trailing slash, then opening succeeds...

    And, paths like:
    c:\dir1\dir2\dir3\

    can be compared too.

    Regards,
    Kimmo

     
  • Anonymous

    Anonymous - 2003-03-05

    Logged In: YES
    user_id=60964

    Fixed both the warning, and the UNC not working with
    trailing slash bug, and also now updated with new merge.cpp
    and merge.dsp changes (esc code & multimon include,
    respectively). Uploading new zip.

    Note that this doesn't preserve trailing slashes across the
    persistence. This doesn't make it fail, but it would be
    nicer if directories were always marked with trailing slash
    in the editboxes. But, this would take a bit of work, as we
    have to mark them that way before saving -- when loading you
    can't (AFAIK) test a UNC path to see if it is really a
    directory the way you can a local path (for local path you
    can just use CFile::GetStatus and check the directory bit).

     
  • Anonymous

    Anonymous - 2003-03-05

    Updated version, fix warning, bug, and integrate new cvs changes

     
  • Kimmo Varis

    Kimmo Varis - 2003-03-05

    Logged In: YES
    user_id=631874

    I have tested this patch for a couple of days without other
    problems. So please checkin this.

     
  • Anonymous

    Anonymous - 2003-03-05
    • status: open --> open-accepted
     
  • Anonymous

    Anonymous - 2003-03-05

    Logged In: YES
    user_id=60964

    Checked in.

     
  • Kimmo Varis

    Kimmo Varis - 2003-03-07

    Logged In: YES
    user_id=631874

    I submitted bug "699382 - Cannot compare files from
    commandline". Caused by this patch.

    My mistake too, since I commented this works for me.

    Duh. I thought there is no differences for command line
    parameter paths and open dialog paths...

    I mention in bug that relative path does not seem to work
    from commandline. That didn't work before patch, so it's RFE.

     
  • Anonymous

    Anonymous - 2003-03-07
    • assigned_to: nobody --> puddle
    • status: open-accepted --> closed-accepted
     
  • Anonymous

    Anonymous - 2003-03-07

    Logged In: YES
    user_id=60964

    Well, this is applied, so I'm closing it.

    It so happens that it also is buggy, as reported by Kimmo,
    but now that is a bug against the cvs itself...

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.