Menu

#3163 "C:" gets replaced with "%SYSTEMDRIVE%" on windows

closed-fixed
5
2008-09-16
2008-09-15
No

A file name like "C:\foo\bar" now appears as "%SYSTEMDRIVE%\foo\bar" in the title bar and buffer list.

The changes in MiscUtilities.VarCompressor appear to have caused this.

This is with r13682.

Discussion

  • daniel hahler

    daniel hahler - 2008-09-15

    Additionally "c:\usr\jedit\build\modes\php.xml" gets replaced with "%=C:%\build\modes\php.xml"

     
  • Alan Ezust

    Alan Ezust - 2008-09-15

    I'm not sure how to reproduce that second one you have. What variable do you think it was replacing there?
    The first problem is fixed in SVN though - it will no longer replace variables whose names are longer than their values.

     
  • Alan Ezust

    Alan Ezust - 2008-09-15
    • status: open --> pending-fixed
     
  • daniel hahler

    daniel hahler - 2008-09-16
    • status: pending-fixed --> open-accepted
     
  • daniel hahler

    daniel hahler - 2008-09-16

    I've added a
    Log.log(Log.DEBUG,MiscUtilities.class, "PUT: '" + v + "' => '" + k + "'" );
    before the "prefixMap.put(v, k);" and it contains '=c:' => 'c:\usr\jedit'.

    When I execute "set" in a jEdit console window, the list contains:
    !C:='C:\usr\jedit'

    I'd say this entry needs to be ignored - whatever it means (maybe starting directory?!).

    Also the key "_" should probably get ignored - which contains "bash" in a jEdit console.

     
  • daniel hahler

    daniel hahler - 2008-09-16

    Something like the following could fix this:

    Index: org/gjt/sp/jedit/MiscUtilities.java

    --- org/gjt/sp/jedit/MiscUtilities.java (Revision 13703)
    +++ org/gjt/sp/jedit/MiscUtilities.java (Arbeitskopie)
    @@ -1775,6 +1775,7 @@

    for (String k: env.keySet()) {
    if (k.equalsIgnoreCase("pwd")) continue;
    + if (k.charAt(0) == '_' || k.charAt(0) == '=') continue;

    String v = env.get(k);
    if (k.length() > v.length()) continue;

     
  • Alan Ezust

    Alan Ezust - 2008-09-16
    • status: open-accepted --> closed-fixed
     
  • Alan Ezust

    Alan Ezust - 2008-09-16

    Committed revision 13704.

     

Log in to post a comment.