mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[NOTEPAD] Simplify FileExists function (#5079)
Simplify FileExists helper function by using GetFileAttributes function. CORE-18837
This commit is contained in:
committed by
GitHub
parent
ebc69d089f
commit
504bf68e2a
@@ -228,13 +228,7 @@ static void AlertPrintError(void)
|
||||
*/
|
||||
BOOL FileExists(LPCTSTR szFilename)
|
||||
{
|
||||
WIN32_FIND_DATA entry;
|
||||
HANDLE hFile;
|
||||
|
||||
hFile = FindFirstFile(szFilename, &entry);
|
||||
FindClose(hFile);
|
||||
|
||||
return (hFile != INVALID_HANDLE_VALUE);
|
||||
return GetFileAttributes(szFilename) != INVALID_FILE_ATTRIBUTES;
|
||||
}
|
||||
|
||||
BOOL HasFileExtension(LPCTSTR szFilename)
|
||||
|
||||
Reference in New Issue
Block a user