rlv-dan / Snap2HTML

Generates directory listings contained in a single, app-like HTML files
http://www.rlvision.com/snap2html
GNU General Public License v3.0
498 stars 94 forks source link

Long file names issue (> 255 characters) #16

Open kotek-glupotek opened 4 years ago

kotek-glupotek commented 4 years ago

When Snap2HTML encounters folders and files where the total length of the file name including absolute path exceeds 255 characters, it either does not display file attributes (size and timestamp) and/or stops the output to the html file if the folder name breaks that limit.

This could be a limit of an old MS Windows API and even most of Microsoft apps including Word, Excel etc. cannot handle longer names even though there are newer API calls supporting much longer file names. There are some apps capable of using nested folder names > 255 characters, e.g. WinRar, Total Commander, AllDup etc.

I experienced this on my NAS, where the file structure is deeply nested but I was able to reproduce it on local Windows 10 drive too. I'm attaching a sample folder structure with nested folders/files exceeding 255 chars to illustrate the issue; the files are all blank (0 bytes).

Snap2HTML.zip

Left-Handed-Cat commented 2 years ago

I can confirm that, I noticed exactly the same behavior: program stops the crawling process suddenly. After investigation i figured out, that the last entry in the file list (html code) exceeds the 255 limit. I'm interested in a solution, too.

crasher32 commented 2 years ago

I might meet the same problem,sincerely hope for a solution.