🐛 fix windows sharepoint path error

This commit is contained in:
微凉 2021-11-30 16:45:08 +08:00
parent 7f35dc6ade
commit fa6c0f78bc

View File

@ -55,7 +55,7 @@ func (driver Onedrive) GetMetaUrl(account *model.Account, auth bool, path string
}
case "sharepoint":
{
if path == "/" {
if path == "/" || path == "\\" {
return fmt.Sprintf("%s/v1.0/sites/%s/drive/root", host.Api, account.SiteId)
} else {
return fmt.Sprintf("%s/v1.0/sites/%s/drive/root:%s:", host.Api, account.SiteId, path)