Description: |
tcl 8.6.12, Windows 10, with latest updates applied
Asking for long filename (which does not exist)
% glob -nocomplain [string repeat x 251]
Ok, empty list.
Adding a "*" makes the path name too long and glob err out
instead of returning an empty list:
% glob -nocomplain [string repeat x 251]*
couldn't read directory "C:/Users/ralf/AppData/Local/Temp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*": no such file or directory
=> IMHO both commands should return an empty list, even if the second command hits
the MAX_PATH limit in Windows.
As an aside, on Linux I can do
% glob -nocomplain [string repeat x 1000000]
% glob -nocomplain [string repeat x 1000000]*
=> empty list each, no error, although trying to create that file also
returns an error since the file name is too long.
|