The FileSystemDirectoryHandle.values() does not consistently return all files within a directory on MacOS when there are 100 or more files present. When attempting to retrieve values from a directory containing over 100 files, the FileSystemDirectoryHandle.values() only retrieves a subset of the files. This missing files seems to occur in batches of 100, resulting in incomplete directory listings.
For instance, in a test scenario involving a directory with 103 image files, having an average size of about 1MB and sharing identical permissions, only 3 files were retrieved using the provided code snippet:
dirHandle = await window.showDirectoryPicker();
entries = []
for await (const entry of dirHandle.values()){
entries.push(entry)
}
Upon repeating the process, usually only 3 files are returned, although occasionally, all 103 files are retrieved. The issue seems to be isolated to MacOS, as the same test on Windows consistently returns all files. The test was also run on different directories each containing images and similar results occurred. This issue on MacOS has only appeared recently. Downgrading the Chromium based browser to an older version released in the previous year and running the test again results in all files being returned.
The FileSystemDirectoryHandle.values() does not consistently return all files within a directory on MacOS when there are 100 or more files present. When attempting to retrieve values from a directory containing over 100 files, the FileSystemDirectoryHandle.values() only retrieves a subset of the files. This missing files seems to occur in batches of 100, resulting in incomplete directory listings.
For instance, in a test scenario involving a directory with 103 image files, having an average size of about 1MB and sharing identical permissions, only 3 files were retrieved using the provided code snippet:
dirHandle = await window.showDirectoryPicker(); entries = [] for await (const entry of dirHandle.values()){ entries.push(entry) }
Upon repeating the process, usually only 3 files are returned, although occasionally, all 103 files are retrieved. The issue seems to be isolated to MacOS, as the same test on Windows consistently returns all files. The test was also run on different directories each containing images and similar results occurred. This issue on MacOS has only appeared recently. Downgrading the Chromium based browser to an older version released in the previous year and running the test again results in all files being returned.