server: Allow setting delete disposition on a read-only directory.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-11-09 14:01:00 +03:00 committed by Alexandre Julliard
parent b95a23e83e
commit 1affd75fcb
1 changed files with 2 additions and 2 deletions

View File

@ -2307,8 +2307,8 @@ static void set_fd_disposition( struct fd *fd, int unlink )
return;
}
/* can't unlink files we don't have permission to access */
if (unlink && !(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
/* can't unlink files we don't have permission to write */
if (unlink && !(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) && !S_ISDIR(st.st_mode))
{
set_error( STATUS_CANNOT_DELETE );
return;