Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Replaced use of access function with stat function when using FileExists
[xestiacalendar/.git] / source / common / file.cpp
index da236b3..01526d0 100644 (file)
@@ -8,16 +8,14 @@ bool FileExists(std::string Filename){
 
 #else 
 
-       const char *FilenameChar = Filename.c_str(); 
-       
-       int rescode = access(FilenameChar, R_OK);
-       
-       if (errno == ENOENT){
+       struct stat BuffData;
+               
+       if (stat(Filename.c_str(), &BuffData) == -1){
                return false;
        }
 
 #endif
-
+       
        return true;
        
 }
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy