Skip to content

Commit

Permalink
Fix excluding of drives and directories.
Browse files Browse the repository at this point in the history
  • Loading branch information
romw committed Jan 10, 2022
1 parent c50ad51 commit c047b11
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ int32_t CleanupTemporaryFiles() {
hFind = FindFirstFile(search.c_str(), &FindFileData);
if (hFind != INVALID_HANDLE_VALUE) {
do {

filename = FindFileData.cFileName;

if ((filename.size() == 1) && (filename == L".")) continue;
Expand Down Expand Up @@ -536,6 +535,9 @@ int32_t ScanDirectory(CScannerOptions& options, std::wstring directory, std::wst
std::wstring file;
std::wstring file_phys;

// Checking for excluded directories
if (IsDirectoryExcluded(options, directory)) return ERROR_NO_MORE_ITEMS;

if (options.verbose) {
wprintf(L"Processing Directory '%s'\n", directory.c_str());
}
Expand Down Expand Up @@ -568,9 +570,6 @@ int32_t ScanDirectory(CScannerOptions& options, std::wstring directory, std::wst
dir_phys.clear();
}

// Checking for excluded directories
if (IsDirectoryExcluded(options, dir)) continue;

ReportProcessDirectory();

rv = ScanDirectory(options, dir, dir_phys);
Expand Down

0 comments on commit c047b11

Please sign in to comment.