Skip to content
Tcl Source Code History Of Ticket 611125ffffffffff
Login

History Of Ticket 611125ffffffffff

Artifacts Associated With Ticket 611125ffffffffff

  1. Ticket change [cc4cdde56a] (rid 95673) by jkbonfield on 2002-09-18 14:40:07:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      glob and open work differently when it comes to 
      backslashes on Windows.
      
      Both work fine with /. Eg:
      
      % glob S:/foo/bar
      S:/foo/bar
      % open S:/foo/bar
      filexxx
      
      With backslashes, glob works for the drive letter:
      
      % glob S:\\foo/bar
      S:\foo/bar
      
      But with double backslash it fails, yet open does not:
      
      % glob S:\\foo\\bar
      no files matched ...
      % open S:\\foo\\bar
      fileyyy
      
      
      
    4. foundin initialized to: "obsolete: 8.4.0"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "jkbonfield"
    9. subsystem initialized to: "37. File System"
    10. title initialized to: "glob and backslashes on windows"
    11. type initialized to: "Bug"
  2. Ticket change [0be39ba604] (rid 114077) by vincentdarley on 2002-09-19 00:24:03:

    1. closedate changed to: "2002-09-18T17:24:03"
    2. closer changed to: "vincentdarley"
    3. icomment:
      Logged In: YES 
      user_id=32170
      
      Remember that 'glob foo' is treating 'foo' as a pattern, 
      and therefore if 'foo' contains "glob-sensitive" 
      characters (the curly braces and backslash, for 
      example), then those characters must be quoted if you 
      don't want glob to treat foo as a pattern.
      
      If you don't want 'foo' treated as a pattern, then use '-
      path', for example:
      
      glob -path S:\\foo\\bar ""
      
      in your example above will work.  What is happening is 
      that 'glob' is actually looking for the file S:foo/bar in 
      your second example (which we interpret as S:/foo/bar 
      and is found), but in the 3rd example it is looking for 
      S:foobar (= S:/foobar) which doesn't exist.
      
      'open' obviously doesn't treat its argument as a pattern, 
      so is quite happy either way.
      
      
      
    4. login: "vincentdarley"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "vincentdarley"