From c16213179cefe3cae398584502853098d839fa9e Mon Sep 17 00:00:00 2001 From: dnslin Date: Mon, 15 Dec 2025 17:51:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E4=BB=8E=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E8=AF=BB=E5=8F=96token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cloud/onedrive.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cloud/onedrive.py b/src/cloud/onedrive.py index c419289..79ea44c 100644 --- a/src/cloud/onedrive.py +++ b/src/cloud/onedrive.py @@ -83,6 +83,10 @@ class OneDriveClient(CloudStorageBase): def _get_account(self) -> Account: """获取或创建 Account 实例""" if self._account is None: + # 确保 token 已从文件加载到缓存 + if not self._token_backend.has_data: + self._token_backend.load_token() + # 公共客户端只需要 client_id,不需要 client_secret credentials = (self.config.client_id,) self._account = Account(