From 46a37f05100f0312695f4747f6df0f19db9a4291 Mon Sep 17 00:00:00 2001 From: LinkLeong Date: Thu, 13 Oct 2022 11:32:30 +0100 Subject: [PATCH] fix upload file --- pkg/utils/file/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/utils/file/file.go b/pkg/utils/file/file.go index 1fd9de2..10e91f7 100644 --- a/pkg/utils/file/file.go +++ b/pkg/utils/file/file.go @@ -377,7 +377,7 @@ func SpliceFiles(dir, path string, length int, startPoint int) error { // todo: here should have a goroutine to remove each partial file after it is read, to save disk space - for i := 0; i < length+startPoint; i++ { + for i := 0; i < length+startPoint-1; i++ { data, err := ioutil.ReadFile(dir + "/" + strconv.Itoa(i+startPoint)) if err != nil { return err