#elif defined(__OS2__)
return (::DosDeleteDir((PSZ)dir.c_str()) == 0);
#elif defined(__WXWINCE__)
- return (CreateDirectory(dir, NULL) != 0);
+ return (RemoveDirectory(dir) != 0);
#elif defined(__WXPALMOS__)
// TODO with VFSFileRename()
return false;
bool wxSetWorkingDirectory(const wxString& d)
{
#if defined(__OS2__)
+ if (d[1] == ':')
+ {
+ ::DosSetDefaultDisk(1 + wxToupper(d[0]) - _T('A'));
+ // do not call DosSetCurrentDir when just changing drive,
+ // since it requires e.g. "d:." instead of "d:"!
+ if (d.length() == 2)
+ return true;
+ }
return (::DosSetCurrentDir((PSZ)d.c_str()) == 0);
#elif defined(__UNIX__) || defined(__WXMAC__) || defined(__DOS__)
return (chdir(wxFNSTRINGCAST d.fn_str()) == 0);
#if defined(wxFILEKIND_STUB) || wxONLY_WATCOM_EARLIER_THAN(1,4)
(void)fp;
return wxFILE_KIND_DISK;
-#elif defined(__WINDOWS__) && !defined(__CYGWIN__) && !defined(__WATCOMC__)
+#elif defined(__WINDOWS__) && !defined(__CYGWIN__) && !defined(__WATCOMC__) && !defined(__WINE__)
return fp ? wxGetFileKind(_fileno(fp)) : wxFILE_KIND_UNKNOWN;
#else
return fp ? wxGetFileKind(fileno(fp)) : wxFILE_KIND_UNKNOWN;