Add strerror() to the "Could not stat" and "Invalid path" startup
error messages.
This commit is contained in:
parent
f45f66beff
commit
0348212609
|
@ -48,13 +48,14 @@ static int DIR_GetPath( const char *keyname, const char *defval,
|
|||
{
|
||||
char path[MAX_PATHNAME_LEN];
|
||||
BY_HANDLE_FILE_INFORMATION info;
|
||||
const char *mess = "does not exist";
|
||||
|
||||
PROFILE_GetWineIniString( "wine", keyname, defval, path, sizeof(path) );
|
||||
if (!DOSFS_GetFullName( path, TRUE, full_name ) ||
|
||||
!FILE_Stat( full_name->long_name, &info ) ||
|
||||
!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
(!FILE_Stat( full_name->long_name, &info ) && (mess=strerror(errno)))||
|
||||
(!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && (mess="not a directory")))
|
||||
{
|
||||
MESSAGE("Invalid path '%s' for %s directory\n", path, keyname);
|
||||
MESSAGE("Invalid path '%s' for %s directory: %s\n", path, keyname, mess);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
|
|
@ -168,7 +168,8 @@ int DRIVE_Init(void)
|
|||
|
||||
if (stat( path, &drive_stat_buffer ))
|
||||
{
|
||||
MESSAGE("Could not stat %s, ignoring drive %c:\n", path, 'A' + i );
|
||||
MESSAGE("Could not stat %s, ignoring drive %c: %s\n",
|
||||
path, 'A' + i, strerror(errno));
|
||||
continue;
|
||||
}
|
||||
if (!S_ISDIR(drive_stat_buffer.st_mode))
|
||||
|
|
Loading…
Reference in New Issue