Fixed wxDirExists implementation for OS/2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		| @@ -1237,7 +1237,13 @@ bool wxDirExists(const wxChar *pszPathName) | |||||||
|  |  | ||||||
|     return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY); |     return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY); | ||||||
| #elif defined(__OS2__) | #elif defined(__OS2__) | ||||||
|     return (bool)(::DosSetCurrentDir((PSZ)(WXSTRINGCAST strPath))); |     FILESTATUS3 Info = {{0}}; | ||||||
|  |     APIRET rc = ::DosQueryPathInfo((PSZ)(WXSTRINGCAST strPath), FIL_STANDARD, | ||||||
|  |                                    (void*) &Info, sizeof(FILESTATUS3)); | ||||||
|  |  | ||||||
|  |     return ((rc == NO_ERROR) && (Info.attrFile & FILE_DIRECTORY)) || | ||||||
|  |       (rc == ERROR_SHARING_VIOLATION); | ||||||
|  |     // If we got a sharing violation, there must be something with this name. | ||||||
| #else // !__WIN32__ | #else // !__WIN32__ | ||||||
|  |  | ||||||
|     wxStructStat st; |     wxStructStat st; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user