Mercurial > hg > openttd
changeset 7302:23edab38b472 draft
(svn r10651) -Fix: Fix chdir problem with open/save dialog on OS/2 (Paul Smedley)
author | orudge <orudge@openttd.org> |
---|---|
date | Sun, 22 Jul 2007 17:21:25 +0000 |
parents | 6a4b1938d5d9 |
children | a3e69901e01c |
files | src/os2.cpp |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os2.cpp +++ b/src/os2.cpp @@ -44,6 +44,8 @@ _dos_getdrive(&save); // save original drive #else save = _getdrive(); // save original drive + char wd[MAX_PATH]; + getcwd(wd, MAX_PATH); total = 'z'; #endif @@ -55,7 +57,7 @@ for (disk = 'A';; disk++) { _chdrive(disk); #endif - if (disk >= total) return; + if (disk >= total) break; #ifndef __INNOTEK_LIBC__ _dos_getdrive(&disk2); @@ -80,7 +82,7 @@ #ifndef __INNOTEK_LIBC__ _dos_setdrive(save, &total); #else - _chdrive(save); + chdir(wd); #endif }