Fixed automatic drive detection for the case that the root directory
is not already mapped.
This commit is contained in:
parent
b33ef44105
commit
5e161ac72a
|
@ -151,9 +151,12 @@ static void ensure_root_is_mapped()
|
|||
|
||||
for (letter = 'Z'; letter >= 'A'; letter--)
|
||||
{
|
||||
if (drives[letter - 'A'].in_use) continue;
|
||||
add_drive(letter, "/", "System", 0, DRIVE_FIXED);
|
||||
WINE_TRACE("allocated drive %c as the root drive\n", letter);
|
||||
if (!drives[letter - 'A'].in_use)
|
||||
{
|
||||
add_drive(letter, "/", "System", "0", DRIVE_FIXED);
|
||||
WINE_TRACE("allocated drive %c as the root drive\n", letter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (letter == ('A' - 1)) report_error(NO_ROOT);
|
||||
|
|
|
@ -108,7 +108,7 @@ void PRINTERROR(void); /* WINE_TRACE() the plaintext error message from GetLastE
|
|||
/* returns a string in the win32 heap */
|
||||
static inline char *strdupA(char *s)
|
||||
{
|
||||
char *r = HeapAlloc(GetProcessHeap(), 0, strlen(s));
|
||||
char *r = HeapAlloc(GetProcessHeap(), 0, strlen(s)+1);
|
||||
return strcpy(r, s);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue