Skip to content

Commit

Permalink
fix scanning current directory on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamiras committed Jan 17, 2024
1 parent bd25e97 commit cd95605
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/RAHasher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,13 @@ static int process_files(int consoleId, const std::string& pattern)
int count = 0;

#ifdef _WIN32
const std::string path = util::directory(pattern);
std::string path = util::directory(pattern);
WIN32_FIND_DATAA fileData;
HANDLE hFind;

if (path == pattern) /* no backslash found.scan is in current directory */
path = ".";

hFind = FindFirstFileA(pattern.c_str(), &fileData);
if (hFind != INVALID_HANDLE_VALUE)
{
Expand Down

0 comments on commit cd95605

Please sign in to comment.