Open numberpi opened 10 years ago
I hat to say, this but that is a limitation that probably dates back to the 1980's ... I know that doesn't help, but I'm not sure what the answer is other than writing an entirely different implementation of FileTree to accommodate an out-dated limitation?
If you are able to come up with a viable workaround for NTFS, I'd be willing to merge it into the code base...
Dale
On Wed, Jun 18, 2014 at 10:13 AM, numberpi notifications@github.com wrote:
You cannot save a method with length > 255 to filetree, because NTFS limits file name length to 255.
Example method from Monticello:
[image: image] https://cloud.githubusercontent.com/assets/4451364/3317293/98e82d14-f70b-11e3-9398-ffcab353c70c.png
Error:
[image: image] https://cloud.githubusercontent.com/assets/4451364/3317297/a4cf6ad4-f70b-11e3-9e8a-d2d8f3b2263b.png
— Reply to this email directly or view it on GitHub https://github.com/dalehenrich/filetree/issues/127.
Sadly, this limitation is common, according to https://en.wikipedia.org/wiki/Filename
FS | Length |
---|---|
VFAT | 255 |
NTFS | 255 |
HFS+ | 255 |
ext3 | 255 |
UFS | 255 |
The only one with longer names would be Amiga SFS with 32,000.
So at some point we have to deal with this :(
Interesting ... the only folks who I've heard having problems are folks using windows. For example I published a one-click that image that had it's github-cache included and a windows user said then when he unzipped the file, windows complained about that directory and he ended up deleting it (I admit that I do not remember the exact error) ... the zip file was create on a mac and I was able to use it on both mac and linux without problems ... perhaps there are other Windows filesystem limitations that he ran into?
Here's a 298 character file name that I was able to use on my mac:
/Users/daleh/Pharo1.4/tODE_0.0.1-p1.4.app/Contents/Resources/github-cache/dalehenrich/metacello-work/8d57503cbcdb4cbf31730e6d9b12b18a55fa0171/dalehenrich-metacello-work-8d57503/repository/Metacello-TestsMCB.package/MetacelloDetermineCurrentVersionForLoadScriptTest.class/instance/testIssue112new.st
So something does not compute...
Sorry for having been unclear, the maximum length of 255 (byte or unicode code points, depending on file system) is not for the whole path but only its final component, the file name itself. That is why saving the Monticello Package (which @numberpi tried) won't work no neither windows, mac, or linux.
Other than that, yes, NTFS has a practical path length restriction of about 260 characters (which typically shadows the 255 character filename limit)
Okay ... the one who complained about the github cache problem implied that there is a pathname limitation on windows as well and I assumed that this was a variant of the same problem ... presumably there will be additional issues on windows:)
If it a single file name that is the problem, then the name can be replaced with any unique sequence of characters ... Patching the method MCFileTreeStCypressWriter>>fileNameMapFor for long filenames should be pretty straightforward...
I'll take on this once I find some time :)
Haha, that's my problem as well ...
You cannot save a method with length > 255 to filetree, because NTFS limits file name length to 255.
Example method from Monticello:
Error: