Skip to content

Commit

Permalink
Close file search handle
Browse files Browse the repository at this point in the history
  • Loading branch information
ledoge authored May 20, 2021
1 parent 8a932de commit 5ac9ee4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dwm_lut_injector.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ void ClearAllPermissions(char *folder) {
strcat(path, "\\*");

HANDLE hFind = FindFirstFileA(path, &findData);
if (hFind == INVALID_HANDLE_VALUE) return;
do {
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
char filePath[MAX_PATH];
Expand All @@ -70,7 +71,8 @@ void ClearAllPermissions(char *folder) {
ClearPermissions(filePath);
}
} while (FindNextFile(hFind, &findData) != 0);

FindClose(hFind);

ClearPermissions(folder);
}

Expand Down

0 comments on commit 5ac9ee4

Please sign in to comment.