From: Ralf Habacker ralf.habacker@freenet.de
Fixup for commit 8113fc08200. --- server/fd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/server/fd.c b/server/fd.c index 31a7be9d15a..027a1aa0500 100644 --- a/server/fd.c +++ b/server/fd.c @@ -2045,7 +2045,10 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam set_error( STATUS_OBJECT_NAME_COLLISION ); goto error; } - ftruncate( fd->unix_fd, 0 ); + if (fd->unix_fd != -1) + ftruncate( fd->unix_fd, 0 ); + else + truncate( fd->unix_name, 0 ); } } else /* special file */