mirror of
https://github.com/AlistGo/alist.git
synced 2025-05-28 19:05:53 +08:00
✨ onedrive webdav write
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
@ -34,7 +35,7 @@ func GetFileType(ext string) int {
|
||||
if ext == "" {
|
||||
return conf.UNKNOWN
|
||||
}
|
||||
ext = strings.ToLower(strings.TrimLeft(ext,"."))
|
||||
ext = strings.ToLower(strings.TrimLeft(ext, "."))
|
||||
if IsContain(conf.OfficeTypes, ext) {
|
||||
return conf.OFFICE
|
||||
}
|
||||
@ -116,9 +117,9 @@ func Base(path string) string {
|
||||
}
|
||||
|
||||
func Join(elem ...string) string {
|
||||
res := filepath.Join(elem...)
|
||||
res := path.Join(elem...)
|
||||
if res == "\\" {
|
||||
res = "/"
|
||||
}
|
||||
return res
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user