]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
no changes, just refactor the code sending spin update event to SendSpinUpdate()...
[wxWidgets.git] / src / common / filefn.cpp
index 1d0a96278c72145467a4641de8c3f579d1c6bcd9..1f87e838c54696320d40b149195f1378198921e7 100644 (file)
@@ -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);