From: Wayne Davison Date: Tue, 15 Jan 2019 16:51:08 +0000 (-0800) Subject: Fix --prealloc to keep file-size 0 when possible. X-Git-Tag: v3.2.0pre1~215 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c2da3809f714d936dec1cab6d5bf8b724b9cd113;p=thirdparty%2Frsync.git Fix --prealloc to keep file-size 0 when possible. --- diff --git a/syscall.c b/syscall.c index dbd556b8..0d1221b3 100644 --- a/syscall.c +++ b/syscall.c @@ -462,7 +462,7 @@ int do_utime(const char *fname, time_t modtime, UNUSED(uint32 mod_nsec)) OFF_T do_fallocate(int fd, OFF_T offset, OFF_T length) { - int opts = inplace || preallocate_files ? 0 : DO_FALLOC_OPTIONS; + int opts = inplace || preallocate_files ? DO_FALLOC_OPTIONS : 0; int ret; RETURN_ERROR_IF(dry_run, 0); RETURN_ERROR_IF_RO_OR_LO;