From: Joel Holdsworth joel@airwebreathe.org.uk
Signed-off-by: Joel Holdsworth joel@airwebreathe.org.uk --- server/fd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/server/fd.c b/server/fd.c index eaebe044f37..b8a6bea3eae 100644 --- a/server/fd.c +++ b/server/fd.c @@ -2524,9 +2524,7 @@ static void set_fd_disposition( struct fd *fd, int unlink ) } }
- fd->closed->unlink = unlink ? 1 : 0; - if (fd->options & FILE_DELETE_ON_CLOSE) - fd->closed->unlink = -1; + fd->closed->unlink = (unlink || (fd->options & FILE_DELETE_ON_CLOSE)) ? 1 : 0; }
/* set new name for the fd */