SetFileAttributes returns now an error if target file is on CDROM.
This commit is contained in:
parent
34f5563dab
commit
8691c8ec4b
21
win32/file.c
21
win32/file.c
@ -91,10 +91,23 @@ BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD attributes)
|
|||||||
lpFileName,attributes);
|
lpFileName,attributes);
|
||||||
if (-1==chmod(full_name.long_name,buf.st_mode))
|
if (-1==chmod(full_name.long_name,buf.st_mode))
|
||||||
{
|
{
|
||||||
FILE_SetDosError();
|
if(GetDriveTypeA(lpFileName) == DRIVE_CDROM) {
|
||||||
MESSAGE("Wine ERROR: Couldn't set file attributes for existing file \"%s\".\n"
|
SetLastError( ERROR_ACCESS_DENIED );
|
||||||
"Check permissions or set VFAT \"quiet\" mount flag\n", full_name.long_name);
|
return FALSE;
|
||||||
return TRUE;
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FIXME: We don't return FALSE here because of differences between
|
||||||
|
* Linux and Windows privileges. Under Linux only the owner of
|
||||||
|
* the file is allowed to change file attributes. Under Windows,
|
||||||
|
* applications expect that if you can write to a file, you can also
|
||||||
|
* change its attributes (see GENERIC_WRITE). We could try to be
|
||||||
|
* clever here but that would break multi-user installations where
|
||||||
|
* users share read-only DLLs. This is because some installers like
|
||||||
|
* to change attributes of already installed DLLs.
|
||||||
|
*/
|
||||||
|
FIXME("Couldn't set file attributes for existing file \"%s\".\n"
|
||||||
|
"Check permissions or set VFAT \"quiet\" mount flag\n", full_name.long_name);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user