Skip to content

Commit

Permalink
fix: fix subfolder creation (#292)
Browse files Browse the repository at this point in the history
Because

- wrong subfolder creation code

This commit

- create subfolder in model-repository
  • Loading branch information
Phelan164 committed Feb 25, 2023
1 parent 7f8d78b commit 0b6ec3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/util/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func Unzip(filePath string, dstDir string, owner string, uploadedModel *datamode
}
// ensure the parent folder existed
if _, err := os.Stat(filepath.Base(filePath)); os.IsNotExist(err) {
if err := os.MkdirAll(filePath, os.ModePerm); err != nil {
if err := os.MkdirAll(filepath.Base(filePath), os.ModePerm); err != nil {
return "", "", err
}
}
Expand Down

0 comments on commit 0b6ec3f

Please sign in to comment.