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:
@@ -47,6 +47,23 @@ void FileAttributes(const char* path)
|
||||
FILESTATUS3 fileStatus = {{0}};
|
||||
#endif
|
||||
|
||||
// 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