Open Bug 1656848 Opened 4 years ago Updated 6 months ago

FileSystemDirectoryEntry.createReader/FileSystemDirectoryReader.readEntries: Windows: Entries with long path names are silently ignored

Categories

(Core :: DOM: File, defect, P3)

79 Branch
defect

Tracking

()

Tracking Status
firefox79 --- affected
firefox80 --- affected
firefox81 --- affected

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.

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.

Status: UNCONFIRMED → NEW
Component: Untriaged → File Handling
Ever confirmed: true
Component: File Handling → DOM: File
Product: Firefox → Core
Severity: -- → S3
Priority: -- → P3

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.

Flags: needinfo?(jkrause)
Flags: needinfo?(jan.rio.krause) → needinfo?(jjalkanen)
Flags: needinfo?(jjalkanen)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: