From a48cdd0281c3dd2f1a50d4241d87cb522bbb273b Mon Sep 17 00:00:00 2001 From: Steven Siloti Date: Wed, 14 Jun 2017 20:38:22 -0700 Subject: [PATCH] fix check for fully allocated file on windows The file allocation size is in terms of clusters so it will likely be larger than the file size even with a freshly allocated file. --- src/file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file.cpp b/src/file.cpp index 7aee4bdf7..667b35b19 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -2117,7 +2117,7 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER { offs = inf.AllocationSize; } - if (offs.QuadPart != s) + if (offs.QuadPart < s) { // if the user has permissions, avoid filling // the file with zeroes, but just fill it with