windows: paths starting with tilde (~) are "partially" absolute
|User & Date:||sebres 2019-11-08 13:30:37|
- Change comment to:
Issue could be considered as continuation of [9e6b569963]...
Note the ticket is only about
~/*(which could be firstly considered as rather absolute path).
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 $filenamebehaves incorrectly under windows if
% file join $env(tmp) ~* ~* % file join $env(tmp) ~abc.txt ~abc.txt
globalready has correct behavior here:
% glob -directory e:/temp ~* e:/temp/~abc.txt % glob e:/temp/~* e:/temp/~abc.txt % cd e:/temp % glob [pwd]/~* E:/Temp/~abc.txt
Just this one is a bit confusing (I know it is a bit "ambiguous", but...):
Despite ambiguity it looks still weird to me:
% glob ~* user "*" doesn't exist
- either the decision remains "path of pattern is absolute", it could be fixed to list all users/homes where caller is permitted.
- 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).
- Change login to "sebres"
- Change mimetype to "text/plain"