From 64675820f18233d9d79458b69b65fd3ef611c0f7 Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Mon, 23 Mar 2026 22:08:51 +0800 Subject: [PATCH] fix(koplugin): fixed koreader crash on logout, closes #3598 (#3603) --- apps/readest.koplugin/main.lua | 4 ++-- apps/readest.koplugin/syncauth.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/readest.koplugin/main.lua b/apps/readest.koplugin/main.lua index fd8850f8..67dc92fc 100644 --- a/apps/readest.koplugin/main.lua +++ b/apps/readest.koplugin/main.lua @@ -87,7 +87,7 @@ function ReadestSync:addToMainMenu(menu_items) end else return function(menu) - SyncAuth:logout(self.settings, menu) + SyncAuth:logout(self.settings, self.path, menu) end end end, @@ -221,7 +221,7 @@ function ReadestSync:pullBookConfig(interactive) SyncConfig:pull( self.ui, self.settings, client, book_hash, meta_hash, interactive, - function() SyncAuth:logout(self.settings) end + function() SyncAuth:logout(self.settings, self.path) end ) end diff --git a/apps/readest.koplugin/syncauth.lua b/apps/readest.koplugin/syncauth.lua index 3ba506c4..2468fdaa 100644 --- a/apps/readest.koplugin/syncauth.lua +++ b/apps/readest.koplugin/syncauth.lua @@ -152,9 +152,9 @@ function SyncAuth:doLogin(settings, path, email, password, menu) end end -function SyncAuth:logout(settings, menu) +function SyncAuth:logout(settings, path, menu) if settings.access_token then - local client = self:getSupabaseAuthClient(settings, "") + local client = self:getSupabaseAuthClient(settings, path) if client then client:sign_out(settings.access_token, function(success, _response) logger.dbg("ReadestSync: Sign out result:", success)