Win16 compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -299,11 +299,17 @@ wxString wxPathList::FindAbsoluteValidPath (const wxString& file)
|
||||
bool
|
||||
wxFileExists (const wxString& filename)
|
||||
{
|
||||
#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
|
||||
#if defined(__WIN32__) && !defined(__WXMICROWIN__)
|
||||
// GetFileAttributes can copy with network paths
|
||||
DWORD ret = GetFileAttributes(filename);
|
||||
DWORD isDir = (ret & FILE_ATTRIBUTE_DIRECTORY);
|
||||
return ((ret != 0xffffffff) && (isDir == 0));
|
||||
DWORD ret = ::GetFileAttributes(filename);
|
||||
if ( ret == (DWORD)-1 )
|
||||
{
|
||||
wxLogLastError(_T("GetFileAttributes"));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return !(ret & FILE_ATTRIBUTE_DIRECTORY);
|
||||
#else
|
||||
wxStructStat stbuf;
|
||||
if ( !filename.empty() && wxStat (OS_FILENAME(filename), &stbuf) == 0 )
|
||||
@@ -1274,11 +1280,17 @@ bool wxPathExists(const wxChar *pszPathName)
|
||||
}
|
||||
#endif // __WINDOWS__
|
||||
|
||||
#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
|
||||
#if defined(__WIN32__) && !defined(__WXMICROWIN__)
|
||||
// Stat can't cope with network paths
|
||||
DWORD ret = GetFileAttributes(strPath.c_str());
|
||||
DWORD isDir = (ret & FILE_ATTRIBUTE_DIRECTORY);
|
||||
return ((ret != 0xffffffff) && (isDir != 0));
|
||||
DWORD ret = ::GetFileAttributes(filename);
|
||||
if ( ret == (DWORD)-1 )
|
||||
{
|
||||
wxLogLastError(_T("GetFileAttributes"));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return (ret & FILE_ATTRIBUTE_DIRECTORY) != 0;
|
||||
#else
|
||||
|
||||
wxStructStat st;
|
||||
|
Reference in New Issue
Block a user