FileSystemDirectoryEntry.createReader/FileSystemDirectoryReader.readEntries: Windows: Entries with long path names are silently ignored
Categories
(Core :: DOM: File, defect, P3)
Tracking
()
People
(Reporter: dominik.hoelzl, Unassigned)
Details
Attachments
(1 file)
2.42 KB,
application/x-zip-compressed
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36
Steps to reproduce:
Using FileSystemDirectoryEntry.createReader/FileSystemDirectoryReader.readEntries on Windows, for e.g. reading the file entries in a drag & drop operation: Files/directories with long path names are silently ignored.
Reproduction with attached FirefoxLongPathRepro.zip:
- Extract LongPath.zip with e.g. 7Zip on Desktop (NT file system)
- Make sure the extracted folder LONGPATH contains 3 folders and 2 files
- Open Drop.html in Firefox
- Drop extracted folder LONGPATH on "DROP HERE"
- Entry count should be 6 and all items from the ZIP file should be shown or an error message should be displayed:
LONGPATH
-0123456789
--0123456789
---0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
----ShortPath.txt
----LongPath0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789.txt
Actual results:
Current behavior: The File LongPath0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789.txt is silently ignored, there is no possibility to detect this in JavaScript.
In Google Chrome an error is thrown when using the exact same reproduction scenario.
Expected results:
Either an error should be thrown or the file entries with long paths should not be ignored and can be processed as all other file entires.
Silently ignoring those files results in data loss as the user cannot be notified that files are missing.
Comment 1•4 years ago
|
||
Hi,
Thanks for the details. I was able to reproduce on windows10 pro, on the following versions
release 79.0
beta, 80.0b4 (64-bit)
nightly 81.0a1 (2020-08-07) (64-bit)
Also got /LONGPATH: A URI supplied to the API was malformed, or the resulting Data URL has exceeded the URL length limitations for Data URLs. error in Chrome.
I will move this over to a component so developers can take a look over it. If is not the correct component please feel free to change it to an appropriate one.
Thanks for the report.
Best regards, Clara.
Updated•4 years ago
|
Comment 2•4 years ago
|
||
I guess, this could be fixed by using the "\?" prefix:
https://searchfox.org/mozilla-central/rev/62f6cc5d9c829bc0c6f18e25f93203a98681ac97/xpcom/io/nsILocalFileWin.idl#100
Comment 3•2 years ago
|
||
Jan-Rio, is this something you want to look into? I verified that it still reproduces. You might want to talk to :janv for some context.
Updated•6 months ago
|
Updated•6 months ago
|
Description
•