--- wine-20021204/files/drive.c.orig 2002-10-26 04:15:34.000000000 +0200 +++ wine-20021204/files/drive.c 2002-12-06 21:21:21.000000000 +0100 @@ -203,6 +203,7 @@ static const WCHAR ReadVolInfoW[] = {'R','e','a','d','V','o','l','I','n','f','o',0}; static const WCHAR FailReadOnlyW[] = {'F','a','i','l','R','e','a','d','O','n','l','y',0}; static const WCHAR driveC_labelW[] = {'D','r','i','v','e',' ','C',' ',' ',' ',' ',0}; + static const WCHAR AutoMountW[] = {'A','u','t','o','M','o','u','n','t',0}; for (i = 0, drive = DOSDrives; i < MAX_DOS_DRIVES; i++, name[6]++, drive++) { @@ -234,23 +235,34 @@ WideCharToMultiByte(drive->codepage, 0, path, -1, drive->root + strlen(drive->root), len, NULL, NULL); } - if (stat( drive->root, &drive_stat_buffer )) - { - MESSAGE("Could not stat %s (%s), ignoring drive %c:\n", - drive->root, strerror(errno), 'A' + i); - HeapFree( GetProcessHeap(), 0, drive->root ); - drive->root = NULL; - continue; - } - if (!S_ISDIR(drive_stat_buffer.st_mode)) - { - MESSAGE("%s is not a directory, ignoring drive %c:\n", - drive->root, 'A' + i ); - HeapFree( GetProcessHeap(), 0, drive->root ); - drive->root = NULL; - continue; - } - + if (stat( drive->root, &drive_stat_buffer )) + { + if (PROFILE_GetWineIniBool (name, AutoMountW, 0)) + { + MESSAGE("Could not stat %s (%s), keeping automount drive %c:\n", + drive->root, strerror(errno), 'A' + i); + /* never match in DRIVE_FindDriveRoot */ + drive_stat_buffer.st_dev = 0; + drive_stat_buffer.st_ino = 0; + }else{ + MESSAGE("Could not stat %s (%s), ignoring drive %c:\n", + drive->root, strerror(errno), 'A' + i); + HeapFree( GetProcessHeap(), 0, drive->root ); + drive->root = NULL; + continue; + } + } + else if (!S_ISDIR(drive_stat_buffer.st_mode)) + { + if (1) + { + MESSAGE("%s is not a directory, ignoring drive %c:\n", + drive->root, 'A' + i ); + HeapFree( GetProcessHeap(), 0, drive->root ); + drive->root = NULL; + continue; + } + } drive->dos_cwd = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(drive->dos_cwd[0])); drive->unix_cwd = heap_strdup( "" ); drive->type = DRIVE_GetDriveType( name );