diff --git a/pkg/fileutil/preallocate.go b/pkg/fileutil/preallocate.go index e239e524a..bb7f02812 100644 --- a/pkg/fileutil/preallocate.go +++ b/pkg/fileutil/preallocate.go @@ -23,7 +23,7 @@ import "os" // Otherwise, the error encountered will be returned. func Preallocate(f *os.File, sizeInBytes int64, extendFile bool) error { if extendFile { - preallocExtend(f, sizeInBytes) + return preallocExtend(f, sizeInBytes) } return preallocFixed(f, sizeInBytes) }