[CMD] Code formatting for IsValidPathName, IsExistingFile, IsExistingDirectory, and use INVALID_FILE_ATTRIBUTES instead of an hardcoded value.

This commit is contained in:
Hermès Bélusca-Maïto 2020-09-04 00:17:15 +02:00
parent a5634138c3
commit 050df0f56d
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
4 changed files with 20 additions and 21 deletions

View file

@ -532,7 +532,7 @@ FileNameContainsSpecialCharacters(LPTSTR pszFileName)
(chr == _T('^')) ||
(chr == _T('~')) ||
(chr == _T('+')) ||
(chr == 0xB4)) // '´'
(chr == 0xB4)) // '´'
{
return TRUE;
}
@ -669,7 +669,7 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
/* Don't show files when they are doing 'cd' or 'rd' */
if (!ShowAll &&
file.dwFileAttributes != 0xFFFFFFFF &&
file.dwFileAttributes != INVALID_FILE_ATTRIBUTES &&
!(file.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
continue;