Skip to content

Commit

Permalink
uploader to os-system debug
Browse files Browse the repository at this point in the history
  • Loading branch information
lovehunter9 committed Aug 16, 2024
1 parent fa8bf44 commit a81363e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/upload/app/handler4.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (a *appController) UploadLink(c *fiber.Ctx) error {
models.NewResponse(1, "missing path query parameter", nil))
}

if !strings.HasPrefix(path, "/") {
if !strings.HasSuffix(path, "/") {
path = path + "/"
}
if strings.HasPrefix(path, CacheRequestPrefix) {
Expand Down Expand Up @@ -110,7 +110,7 @@ func (a *appController) UploadedBytes(c *fiber.Ctx) error {
models.NewResponse(1, "missing parent_dir query parameter", nil))
}

if !strings.HasPrefix(parentDir, "/") {
if !strings.HasSuffix(parentDir, "/") {
parentDir = parentDir + "/"
}
if strings.HasPrefix(parentDir, CacheRequestPrefix) {
Expand Down Expand Up @@ -206,7 +206,7 @@ func (a *appController) UploadChunks(c *fiber.Ctx) error {
}

parentDir := resumableInfo.ParentDir
if !strings.HasPrefix(parentDir, "/") {
if !strings.HasSuffix(parentDir, "/") {
parentDir = parentDir + "/"
}
if strings.HasPrefix(parentDir, CacheRequestPrefix) {
Expand Down

0 comments on commit a81363e

Please sign in to comment.