Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit 1280244

Browse files
committed
Merge pull request #139 from adobe/rlim/issue-1937
Skip all system files when reading a folder.
2 parents 4364e25 + 5ee4279 commit 1280244

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

appshell/appshell_extensions_win.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,9 @@ int32 ReadDir(ExtensionString path, CefRefPtr<CefListValue>& directoryContents)
525525

526526
if (hFind != INVALID_HANDLE_VALUE) {
527527
do {
528-
// Ignore '.' and '..'
529-
if (!wcscmp(ffd.cFileName, L".") || !wcscmp(ffd.cFileName, L".."))
528+
// Ignore '.' and '..' and system files
529+
if (!wcscmp(ffd.cFileName, L".") || !wcscmp(ffd.cFileName, L"..") ||
530+
(ffd.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM))
530531
continue;
531532

532533
// Collect file and directory names separately

0 commit comments

Comments
 (0)