git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36366
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY);
#elif defined(__OS2__)
return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY);
#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__
wxStructStat st;
#else // !__WIN32__
wxStructStat st;