wxStat call preliminary fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-11-17 15:16:58 +00:00
parent d5c8817ce5
commit f3660dcb2f
2 changed files with 11 additions and 1 deletions

View File

@@ -298,7 +298,11 @@ wxFileExists (const wxString& filename)
return (ret != (DWORD)-1) && !(ret & FILE_ATTRIBUTE_DIRECTORY);
#else // !__WIN32__
wxStructStat st;
return wxStat(filename, &st) == 0 && (st.st_mode & S_IFREG);
#ifndef wxNEED_WX_UNISTD_H
return wxStat( filename.fn_str() , &st) == 0 && (st.st_mode & S_IFREG);
#else
return wxStat( filename , &st) == 0 && (st.st_mode & S_IFREG);
#endif
#endif // __WIN32__/!__WIN32__
}