mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
In OS/2 change current drive before changing current directory.
This commit is contained in:
@@ -42,6 +42,23 @@ void DirectoryDepth(const char* path)
|
||||
char filename[9];
|
||||
int pos = 2;
|
||||
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
USHORT driveNo = path[0] - '@';
|
||||
#else // 32 bit
|
||||
ULONG driveNo = path[0] - '@';
|
||||
#endif
|
||||
|
||||
if(driveNo > 32) driveNo -= 32;
|
||||
|
||||
rc = __os2_chdisk(driveNo);
|
||||
|
||||
if(rc)
|
||||
{
|
||||
log_write("Cannot change to specified drive, not continuing.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
drivePath[0] = path[0];
|
||||
drivePath[1] = ':';
|
||||
drivePath[2] = '\\';
|
||||
|
||||
Reference in New Issue
Block a user