On 3/9/20 5:01 AM, Alexandre Julliard wrote:
Zebediah Figura z.figura12@gmail.com writes:
@@ -2780,8 +2780,29 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
if (!info->ReplaceIfExists && io->u.Status == STATUS_SUCCESS) {
struct stat st, st2;
int fd;
if ((io->u.Status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL )))
{
RtlFreeAnsiString( &unix_name );
break;
}
if (fstat( fd, &st ) < 0 || stat( unix_name.Buffer, &st2 ) < 0)
{
RtlFreeAnsiString( &unix_name );
io->u.Status = FILE_GetNtStatus();
break;
}
if (st.st_dev == st2.st_dev && st.st_ino == st2.st_ino)
io->u.Status = STATUS_SUCCESS;
else
io->u.Status = STATUS_OBJECT_NAME_COLLISION;
RtlFreeAnsiString( &unix_name );
io->u.Status = STATUS_OBJECT_NAME_COLLISION;
if (needs_close) close( fd );
I feel it would be cleaner to do that on the server side.
Sure, will do.
I guess that's necessary anyway, to fix bug 45935...