Artifacts Associated With Ticket 2001389fffffffff
Ticket change [9922cdce00] (rid 110735) by dgp on 2008-06-24 03:09:54:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- 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. - foundin initialized to: "obsolete: 8.6a0"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "36. Pathname Management"
- title initialized to: "empty string as path: troubling exceptions"
- type initialized to: "Bug"
Ticket change [2a2bafcdf0] (rid 118506) by dgp on 2008-06-24 10:29:09:
- 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. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [321c6fa412] (rid 93552) by dgp on 2008-06-24 10:51:02:
- 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. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment: