X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcommon%2Ffile.cpp;h=01526d0b3c6993540a637441540bd3cf36f840e9;hb=847f9d9759f9d5e540c4de14a507fa27252bf697;hp=da236b31b9f6f925f36e7ed17b8c9ac5bedc045a;hpb=9f8384349b3a6fee3160ad6f835d7ec7b1b2d93f;p=xestiacalendar%2F.git diff --git a/source/common/file.cpp b/source/common/file.cpp index da236b3..01526d0 100644 --- a/source/common/file.cpp +++ b/source/common/file.cpp @@ -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