Tcl Source Code

Ticket Change Details

Artifact ID: 6679ffa549f151a38dafeb2c4b14f88b9efa208e236475fbc982c0871550c52d
Ticket: e83a97c7fee9d6bc2bec78d70b205a0e4d09ea8d
windows: paths starting with tilde (~) are "partially" absolute
User & Date: sebres 2019-11-08 13:23:56

  1. Change assignee to "nobody"
  2. Change closer to "nobody"
  3. Change cmimetype to "text/x-fossil-wiki"
  4. Change comment to:

    Issue could be considered as continuation of [9e6b569963]...

    Under windows it is possible to have relative paths (file and directory names) starting with tilde, as such it is "partially absolute" path, so in my opinion should be interpreted as relative if used in file join.
    From this point of view file join $dirname $filename behaves incorrectly under windows if filename starting with ~ characters:

    % file join $env(tmp) ~*
    % file join $env(tmp) ~abc.txt

    Where glob already has correct behavior here:

    % glob -directory e:/temp ~*
    % glob e:/temp/~*
    % cd e:/temp
    % glob [pwd]/~*

    Just this one is a bit confusing (I know it is a bit "ambiguous", but...):

    % glob ~*
    user "*" doesn't exist
    Despite ambiguity it looks still weird to me:
    1. either the decision remains "path of pattern is absolute", it could be fixed to list all users/homes where caller is permitted.
    2. or the decision going either to "path of pattern considered as relative" under windows, it should behave like glob [pwd]/~* (so find all files starting with "~" in current directory).

    Anyway (after fix) it could be additionally documented (with difference between unix/windows).

  5. Change foundin to "any"
  6. Change is_private to "0"
  7. Change login to "sebres"
  8. Change priority to "5 Medium"
  9. Change resolution to "None"
  10. Change severity to "Minor"
  11. Change status to "Open"
  12. Change submitter to "sebres"
  13. Change subsystem to "36. Pathname Management"
  14. Change title to:

    windows: paths starting with tilde (~) are "partially" absolute

  15. Change type to "Bug"