onedrive webdav write

This commit is contained in:
微凉
2021-12-28 20:34:45 +08:00
parent 3c03344ef1
commit 606134f39c
3 changed files with 188 additions and 11 deletions

View File

@ -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
}
}