Skip to content
Tcl Source Code History Of Ticket 2001389fffffffff
Login

History Of Ticket 2001389fffffffff

Artifacts Associated With Ticket 2001389fffffffff

  1. Ticket change [9922cdce00] (rid 110735) by dgp on 2008-06-24 03:09:54:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      While digging into the details
      of 1999176, the issue of how an
      empty string ought to be handled
      in a pathname context arises again
      and again.
      
      % file pathtype {}
      relative
      
      This suggests {} is a valid relative
      pathname.  However:
      
      % file normalize {}
      %
      
      Unlike every other relative pathname,
      the normalized form is not an absolute
      pathname.  Any code that assumes the
      value returned from [file normalize]
      or Tcl_FSGetNormalizedPath() is an
      absolute path gets tripped up on this
      exception.
      
      Even worse:
      
      % file system {}
      Unrecognised path
      
      If the empty string is a pathname, it's
      a pathname that belongs to no VFS at all.
      That's just broken.
      
      
      
    4. foundin initialized to: "obsolete: 8.6a0"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dgp"
    10. subsystem initialized to: "36. Pathname Management"
    11. title initialized to: "empty string as path: troubling exceptions"
    12. type initialized to: "Bug"
  2. Ticket change [2a2bafcdf0] (rid 118506) by dgp on 2008-06-24 10:29:09:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      [file normalize] and [file system]
      were new in Tcl 8.4, so looking back
      to Tcl 8.3 for guidance loses those.
      However:
      
      % file dirname {}
      .
      % file tail {}
      % file isfile {}
      0
      % file isdirectory {}
      0
      % file type {}
      could not read "": no such file or directory
      % file rootname {}
      % file nativename {}
      %                                           
      
      If I were a judge, I'd declare a mistrial.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [321c6fa412] (rid 93552) by dgp on 2008-06-24 10:51:02:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Comments at lines 2711-2716
      of tclPathObj.c appear to address
      this matter:
      
          /*
           * A special case is required to handle the empty path "". This is a valid
           * path (i.e. the user should be able to do 'file exists ""' without
           * throwing an error), but equally the path doesn't exist. Those are the
           * semantics of Tcl (at present anyway), so we have to abide by them here.
           */
      
      I don't really understand the reasoning
      asserted in that comment, but at least it
      indicates this difficult situation is in place 
      intentionally.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"