Commit 5e161ac7 authored by Michael Jung's avatar Michael Jung Committed by Alexandre Julliard

Fixed automatic drive detection for the case that the root directory

is not already mapped.
parent b33ef441
...@@ -151,9 +151,12 @@ static void ensure_root_is_mapped() ...@@ -151,9 +151,12 @@ static void ensure_root_is_mapped()
for (letter = 'Z'; letter >= 'A'; letter--) for (letter = 'Z'; letter >= 'A'; letter--)
{ {
if (drives[letter - 'A'].in_use) continue; if (!drives[letter - 'A'].in_use)
add_drive(letter, "/", "System", 0, DRIVE_FIXED); {
WINE_TRACE("allocated drive %c as the root drive\n", letter); 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); if (letter == ('A' - 1)) report_error(NO_ROOT);
......
...@@ -108,7 +108,7 @@ void PRINTERROR(void); /* WINE_TRACE() the plaintext error message from GetLastE ...@@ -108,7 +108,7 @@ void PRINTERROR(void); /* WINE_TRACE() the plaintext error message from GetLastE
/* returns a string in the win32 heap */ /* returns a string in the win32 heap */
static inline char *strdupA(char *s) 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); return strcpy(r, s);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment