Changeset - r7302:b28e82a48a40
[Not reviewed]
master
0 1 0
orudge - 17 years ago 2007-07-22 17:21:25
orudge@openttd.org
(svn r10651) -Fix: Fix chdir problem with open/save dialog on OS/2 (Paul Smedley)
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/os2.cpp
Show inline comments
 
@@ -44,6 +44,8 @@ void FiosGetDrives()
 
	_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 @@ void FiosGetDrives()
 
	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 @@ void FiosGetDrives()
 
#ifndef __INNOTEK_LIBC__
 
	_dos_setdrive(save, &total);
 
#else
 
	_chdrive(save);
 
	chdir(wd);
 
#endif
 
}
 

	
0 comments (0 inline, 0 general)