From e4b1e5c3c80ce9faf3a5f13942300a03093fc319 Mon Sep 17 00:00:00 2001 From: mtolman <5067918+mtolman@users.noreply.github.com> Date: Tue, 17 Apr 2018 13:26:48 -0600 Subject: [PATCH] Fix for issue #635 Fix for the following issue on master: https://github.com/chrislusf/seaweedfs/issues/635 --- weed/storage/volume.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/storage/volume.go b/weed/storage/volume.go index f168ad155..a58a74340 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -61,7 +61,7 @@ func (v *Volume) Size() int64 { return stat.Size() } glog.V(0).Infof("Failed to read file size %s %v", v.dataFile.Name(), e) - return -1 + return 0 // -1 causes integer overflow and the volume to become unwritable. } // Close cleanly shuts down this volume