X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/311b04034e700a4a633b47b721cd27568602a3d7..01ad5e43bfb45c4d7622f2d615dd28a411e60367:/src/common/filefn.cpp?ds=sidebyside diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index aeb116b6c4..1f87e838c5 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1270,7 +1270,7 @@ bool wxRmdir(const wxString& dir, int WXUNUSED(flags)) #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; @@ -1575,6 +1575,14 @@ wxString wxGetCwd() 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); @@ -1956,7 +1964,7 @@ wxFileKind wxGetFileKind(FILE *fp) #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;