GoogleChromeLabs / browser-fs-access

File System Access API with legacy fallback in the browser
https://googlechromelabs.github.io/browser-fs-access/demo/
Apache License 2.0
1.37k stars 82 forks source link

Recursive directoryOpen not finding all files in nested MacOs directory #139

Closed steveskimmel closed 1 year ago

steveskimmel commented 1 year ago

The new File System Access API is not performing properly when processing large directories (500+ files) using the latest Chromium browsers on MacOs (110+). The same code performs properly on Chromium browsers (110+) on Windows.

The following example yields different results:

const blobsInDirectory = await directoryOpen({
      recursive: true,
    });

On MacOs, the result consistently yields less than all the files in nested directories. On Windows, the result yields all of the files in nested directories.

I'm trying to understand why this is the case, and what the solution is to properly access all the files in nested directories on all operating systems?

Thank you

tomayac commented 1 year ago

Could it be due to different ways of dealing with hidden files? Windows saves different metadata files like image thumbnails etc. On macOS, the same happens with .DS_Store files. If, for example, you check the same USB pen first on Windows and then on macOS, the second OS will add metadata that was not yet there when you tested on the first.

steveskimmel commented 1 year ago

I don't think that's the case. On prior Chromium versions (109 for example), file detection from within nested directories worked perfectly.

tomayac commented 1 year ago

In this case, it sounds more like a Chrome bug. Could you please try to create a minimally reproducible test case and file a new Chromium bug via new.crbug.com. You can comment with the bug URL here, and I can help triaging. For now, I'm closing the issue, since it's not with the library apparently.

steveskimmel commented 1 year ago

Thank you! https://bugs.chromium.org/p/chromium/issues/detail?id=1421735

tomayac commented 1 year ago

Could you append screenshots that show how the same code delivers different results based on the operating system and the Chrome version? These should be the screenshots I expect:

At present the issue doesn't mention the problem you describe in https://github.com/GoogleChromeLabs/browser-fs-access/issues/139#issuecomment-1456056717.

steveskimmel commented 1 year ago

Chrome 109

MacOS

Screenshot 2023-03-06 at 17 02 41 Screenshot 2023-03-06 at 17 03 08

Windows

Capture Capture1

Chrome 110

MacOs

Screenshot 2023-03-06 at 17 05 05 Screenshot 2023-03-06 at 17 05 48

Windows

Capture2 Capture4

tomayac commented 1 year ago

(Sorry, I meant as attachments to the bug. Please use descriptive file names. Thanks a lot!

steveskimmel commented 1 year ago

Cool, I've done that. Thanks.