mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NOTEPAD] Simplify FileExists function (#5079)
Simplify FileExists helper function by using GetFileAttributes function. CORE-18837
This commit is contained in:
parent
ebc69d089f
commit
504bf68e2a
1 changed files with 1 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue