I don't really have a test case, but to me a positive test for a
regular file makes more sense here than just ruling out FIFOs. While
we probably only ever hit regular files (or FIFOs), there might be
more that we catch and don't properly handle.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
/* Should we atomically (to the client at least) truncate ? */
if ((!new_file_created) &&
(flags2 & O_TRUNC) &&
- (!S_ISFIFO(fsp->fsp_name->st.st_ex_mode))) {
+ (S_ISREG(fsp->fsp_name->st.st_ex_mode))) {
int ret;
ret = SMB_VFS_FTRUNCATE(fsp, 0);