fix(quqi): error on uploading an existing file (#5920)

This commit is contained in:
Echo Response
2024-01-20 21:22:50 +08:00
committed by GitHub
parent 4f7761fe2c
commit 85a28d9822
3 changed files with 36 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"net/url"
stdpath "path"
"strings"
"github.com/alist-org/alist/v3/drivers/base"
@ -97,3 +98,13 @@ func (d *Quqi) checkLogin() bool {
}
return true
}
// rawExt 保留扩展名大小写
func rawExt(name string) string {
ext := stdpath.Ext(name)
if strings.HasPrefix(ext, ".") {
ext = ext[1:]
}
return ext
}