mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 03:43:36 +00:00
[NOTEPAD] Simplify FileExists function (#5079)
Simplify FileExists helper function by using GetFileAttributes function. CORE-18837
This commit is contained in:
@@ -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