Long Filenames (bonkers filenames)
Malcolm Hussain-Gambles (1596) 811 posts |
Just ran into an issue with long filenames on RO 5.19. In case your wondering what the filename is: Why the heck the BBC decided to have jpg’s with names that large is beyond me, but hey it made me chuckle! |
Chris Johnson (125) 825 posts |
The usual limiting factor is the 256 byte length of a wimp message. When the message headers are allowed for it leaves 236 bytes (or is it 232?) for the complete path. The actual filename length limit will then depend upon how deep it is buried in the directory structure. |
Rick Murray (539) 13840 posts |
I was wondering if there was an issue with DOSFS or MimeMap, given that it is a “/jpg” so maybe something else is trying to get a look-in? I think I found a bug in DOSFS. It is the DOSnaming file. There are two functions of note. Here is the first:
and here is the second:
What comes to mind is what happens if the filename is longer than 256 characters before the separator? The string1 and string2 chars are only large enough for 256, and the before() function will, if there isn’t a separator, default to the length of the text string (or if there is, to whatever size that is including >256). Fix: Make the filename buffers appropriately long (might be a FAT issue?) and include a check in before() to ensure that this buffer is not overshot. |
Rick Murray (539) 13840 posts |
Aaaaaaand MimeMap is marked as “The MimeMap module has closed source access under NDA.” so if there is anything going on there with respect to filename size, we’re stuffed. Do you experience the same issues if you rename the file to be |
Malcolm Hussain-Gambles (1596) 811 posts |
I altered my code to use l as a replacement for the . and it still dies in a spectacular way (it seems to kill the entire network stack!) Update: Well I guess I should have expected a URL that was fairy large for that download! But I guess I never expected the URL to be quite that big. |
nemo (145) 2546 posts |
I cloned MimeMap a long time ago. Of course, cloned == different_bugs. |
Steve Pampling (1551) 8170 posts |
Of course that’s also normally cloned == source_as_open_as_author_wishes |