]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
Added empty wxDataViewCtrl header and control name string.
[wxWidgets.git] / src / common / filefn.cpp
index cb433eb7e4ddebb273f78d5c05829ef20d65b3e3..84ebf76d347f062e0b60a00edc836bc9b250da0f 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        filefn.cpp
+// Name:        src/common/filefn.cpp
 // Purpose:     File- and directory-related functions
 // Author:      Julian Smart
 // Modified by:
@@ -1237,7 +1237,13 @@ bool wxDirExists(const wxChar *pszPathName)
 
     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;
@@ -1351,11 +1357,11 @@ wxChar *wxDoGetCwd(wxChar *buf, int sz)
 #if defined(__WXPALMOS__)
     // TODO
     if(buf && sz>0) buf[0] = _T('\0');
-    return NULL;
+    return buf;
 #elif defined(__WXWINCE__)
     // TODO
     if(buf && sz>0) buf[0] = _T('\0');
-    return NULL;
+    return buf;
 #else
     if ( !buf )
     {
@@ -1978,8 +1984,7 @@ wxFileKind wxGetFileKind(FILE *fp)
 {
     // Note: The watcom rtl dll doesn't have fileno (the static lib does).
     //       Should be fixed in version 1.4.
-#if defined(wxFILEKIND_STUB) || \
-        (defined(__WATCOMC__) && __WATCOMC__ <= 1230 && defined(__SW_BR))
+#if defined(wxFILEKIND_STUB) || wxONLY_WATCOM_EARLIER_THAN(1,4)
     (void)fp;
     return wxFILE_KIND_DISK;
 #else