Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4f6bfd456ebdfc5f3d6d0c19915d20c2e7fca1c8cbda7abceb3e2324cb1c7ef9
Ticket: f6db6d1ec409ca399cabf528ad530e045e7d4b40
glob raises an error with too long pathnames on windows
User & Date: ralfixx on 2022-05-17 17:27:04
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    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.
    
  5. foundin changed to: "8.6.12"
  6. is_private changed to: "0"
  7. login: "ralfixx"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "1d3c95db24e116878d6afed7cf890a89a0effe62"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "ralfixx"
  14. subsystem changed to: "36. Pathname Management"
  15. title changed to:
    glob raises an error with long pathnames on windows
    
  16. type changed to: "Bug"