Skip to content

Commit

Permalink
Update alist.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Sakura-Byte committed Jan 26, 2025
1 parent fc8f8c5 commit a5d8c06
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/alist/alist.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
}

// Ensure url does not end with '/'
if strings.HasSuffix(opt.URL, "/") {
opt.URL = opt.URL[:len(opt.URL)-1]
}
opt.URL = strings.TrimSuffix(opt.URL, "/")

// Ensure root starts with '/'
if !strings.HasPrefix(root, "/") {
Expand Down

0 comments on commit a5d8c06

Please sign in to comment.