Skip to content

Commit

Permalink
bpo-38222: Check specifically for a drive, not just a colon (GH-25540)
Browse files Browse the repository at this point in the history
  • Loading branch information
zooba committed Apr 22, 2021
1 parent 4696f12 commit e07d809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/posixmodule.c
Expand Up @@ -1860,8 +1860,8 @@ attributes_from_dir(LPCWSTR pszFile, BY_HANDLE_FILE_INFORMATION *info, ULONG *re
while (--n > 0 && (filename[n] == L'\\' || filename[n] == L'/')) {
((LPWSTR)filename)[n] = L'\0';
}
if (!n || filename[n] == L':') {
// Nothing left te query
if (!n || (n == 1 && filename[1] == L':')) {
// Nothing left to query
free((void *)filename);
return FALSE;
}
Expand Down

0 comments on commit e07d809

Please sign in to comment.