forked from forgejo/forgejo
parent
090e753923
commit
b116418f05
13 changed files with 45 additions and 28 deletions
|
@ -8,13 +8,13 @@ import (
|
|||
"errors"
|
||||
"io"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
packages_model "code.gitea.io/gitea/models/packages"
|
||||
packages_module "code.gitea.io/gitea/modules/packages"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -33,7 +33,7 @@ type BlobUploader struct {
|
|||
}
|
||||
|
||||
func buildFilePath(id string) string {
|
||||
return filepath.Join(setting.Packages.ChunkedUploadPath, path.Clean("/" + strings.ReplaceAll(id, "\\", "/"))[1:])
|
||||
return filepath.Join(setting.Packages.ChunkedUploadPath, util.CleanPath(strings.ReplaceAll(id, "\\", "/")))
|
||||
}
|
||||
|
||||
// NewBlobUploader creates a new blob uploader for the given id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue