Skip to content

Commit

Permalink
Merge branch 'main' into feat/add_gpu_infos
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH authored Jan 18, 2024
2 parents 6444c35 + 3519c05 commit 3865595
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions external/gpu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestGPUInfo(t *testing.T) {
t.Skip()
GPUsInfo, err := external.GPUInfoList()
result, err := external.GPUInfoList()
assert.NilError(t, err)
assert.Equal(t, len(GPUsInfo), 1)
assert.Equal(t, len(result), 1)
}
7 changes: 5 additions & 2 deletions utils/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,14 @@ func AddFile(ar archiver.Writer, path, commonPath string) error {
defer file.Close()

if path != commonPath {
filename := info.Name()
//filename := info.Name()
fpath := strings.Replace(path, commonPath, "", 1)
fpath = filepath.Join(filepath.Base(commonPath), fpath)
//filename := info.Name()
err = ar.Write(archiver.File{
FileInfo: archiver.FileInfo{
FileInfo: info,
CustomName: filename,
CustomName: fpath,
},
ReadCloser: file,
})
Expand Down

0 comments on commit 3865595

Please sign in to comment.