Bug 1813299 - Filter out symlinks for webkitdirectory. r=smaug, a=dmeehan
This is effectively a backout of the following patches from Bug 1274959 except we add comments and test coverage: - Part 1 which made the DirectoryListingTask include symlinks in the results as exposed by Directory.getFilesAndDirectories. https://hg.mozilla.org/mozilla-central/rev/3f1e16d3bfb2 - Part 3 which made GetFilesHelper include symlinks in the results. https://hg.mozilla.org/mozilla-central/rev/e28c3a696524 Test coverage for getFilesAndDirectories is provided by dom/filesystem/tests/test_basic.html by way of changes to its included file dom/filesystem/tests/filesystem_commons.js and changes to the createTreeFile helper in dom/filesystem/tests/script_fileList.js. Test coverage for GetFilesHelper is provided by dom/filesystem/tests/test_webkitdirectory.html and changes to the createTestFile helper in dom/filesystem/tests/script_fileList.js. Commenting out either of the `isLink` test in the relevant C++ code will cause the given tests to fail on non-windows platforms. Differential Revision: https://phabricator.services.mozilla.com/D178894
Showing
- dom/filesystem/GetDirectoryListingTask.cpp 8 additions, 2 deletionsdom/filesystem/GetDirectoryListingTask.cpp
- dom/filesystem/GetFilesHelper.cpp 7 additions, 67 deletionsdom/filesystem/GetFilesHelper.cpp
- dom/filesystem/GetFilesHelper.h 0 additions, 7 deletionsdom/filesystem/GetFilesHelper.h
- dom/filesystem/tests/filesystem_commons.js 4 additions, 0 deletionsdom/filesystem/tests/filesystem_commons.js
- dom/filesystem/tests/script_fileList.js 51 additions, 0 deletionsdom/filesystem/tests/script_fileList.js
- dom/filesystem/tests/test_webkitdirectory.html 89 additions, 2 deletionsdom/filesystem/tests/test_webkitdirectory.html
Loading
Please register or sign in to comment