From 82272fcbf5f1d9a7b7ca9b013ece6b7dffa2757b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=87=89?= Date: Mon, 15 Nov 2021 19:07:04 +0800 Subject: [PATCH] :bug: fix windows onedrive path --- drivers/onedrive.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/onedrive.go b/drivers/onedrive.go index d75fa8e5..2a520797 100644 --- a/drivers/onedrive.go +++ b/drivers/onedrive.go @@ -48,6 +48,7 @@ func init() { func (o Onedrive) GetMetaUrl(account *model.Account, auth bool, path string) string { path = filepath.Join(account.RootFolder, path) + log.Debugf(path) host, _ := onedriveHostMap[account.Zone] if auth { return host.Oauth @@ -55,7 +56,7 @@ func (o Onedrive) GetMetaUrl(account *model.Account, auth bool, path string) str switch account.OnedriveType { case "onedrive": { - if path == "/" { + if path == "/" || path == "\\" { return fmt.Sprintf("%s/v1.0/me/drive/root", host.Api) } else { return fmt.Sprintf("%s/v1.0/me/drive/root:%s:", host.Api, path)