summaryrefslogtreecommitdiffstats
path: root/source/smbd/reply.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r--source/smbd/reply.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 01127b6977a..0e4e466b33e 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -2192,9 +2192,7 @@ int reply_readbraw(connection_struct *conn, char *inbuf, char *outbuf, int dum_s
if (size < sizeneeded) {
SMB_STRUCT_STAT st;
if (vfs_fstat(fsp,fsp->fd,&st) == 0)
- size = st.st_size;
- if (!fsp->can_write)
- fsp->size = size;
+ fsp->size = size = st.st_size;
}
if (startpos >= size)