Commit 03482126 authored by Lawson Whitney's avatar Lawson Whitney Committed by Alexandre Julliard

Add strerror() to the "Could not stat" and "Invalid path" startup

error messages.
parent f45f66be
......@@ -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))
......
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