]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
The write zero bytes is an allocate, not set EOF.
authorJeremy Allison <jra@samba.org>
Fri, 3 Aug 2001 19:32:33 +0000 (19:32 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 3 Aug 2001 19:32:33 +0000 (19:32 +0000)
Jeremy.

source/smbd/reply.c

index ab3fba9830e36c5f98efd07215d77f9588f2676a..a956261a78a67f53e62fd8f40e826a499ddf5cfd 100644 (file)
@@ -2477,7 +2477,8 @@ int reply_write(connection_struct *conn, char *inbuf,char *outbuf,int size,int d
      zero then the file size should be extended or
      truncated to the size given in smb_vwv[2-3] */
   if(numtowrite == 0) {
-      nwritten = vfs_set_filelen(fsp, (SMB_OFF_T)startpos);
+      /* This is actually an allocate call, not set EOF. JRA */
+      nwritten = vfs_allocate_file_space(fsp, (SMB_OFF_T)startpos);
   } else
     nwritten = write_file(fsp,data,startpos,numtowrite);