fix: 修正从缓存读取token

This commit is contained in:
dnslin
2025-12-15 17:51:01 +08:00
parent 5a505fda66
commit c16213179c

View File

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