Skip to content

Commit 3644975

Browse files
committed
update filepath to handle file's path from storage
1 parent b70a3cc commit 3644975

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

routers/api/actions/artifacts_chunks.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"encoding/base64"
99
"fmt"
1010
"io"
11-
"path"
1211
"path/filepath"
1312
"sort"
1413
"time"
@@ -74,7 +73,7 @@ func listChunksByRunID(st storage.ObjectStorage, runID int64) (map[int64][]*chun
7473
baseName := filepath.Base(fpath)
7574
// when read chunks from storage, it only contains storage dir and basename,
7675
// no matter the subdirectory setting in storage config
77-
item := chunkFileItem{Path: path.Join(storageDir, baseName)}
76+
item := chunkFileItem{Path: storageDir + "/" + baseName}
7877
if _, err := fmt.Sscanf(baseName, "%d-%d-%d-%d.chunk", &item.RunID, &item.ArtifactID, &item.Start, &item.End); err != nil {
7978
return fmt.Errorf("parse content range error: %v", err)
8079
}

0 commit comments

Comments
 (0)