From ccbfbabb25b32a7e900e11c70852c8b5f67b909d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Janou=C5=A1ek?= Date: Fri, 5 Jan 2024 19:33:20 +0100 Subject: [PATCH] Fix "Move current book to archive" (#11321) updateItemByPath has recently been replaced with updateItem in both readhistory and readcollection. Fixes: aabd6d7a2602 ("File browser, Collection: improve group actions (#11178)") Fixes: https://github.com/koreader/koreader/issues/11320 --- plugins/movetoarchive.koplugin/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/movetoarchive.koplugin/main.lua b/plugins/movetoarchive.koplugin/main.lua index 0f85ed566..e13f84713 100644 --- a/plugins/movetoarchive.koplugin/main.lua +++ b/plugins/movetoarchive.koplugin/main.lua @@ -103,8 +103,8 @@ function MoveToArchive:onMoveToArchive(do_copy) else text = _("Book moved.\nDo you want to open it from the archive folder?") FileManager:moveFile(document_full_path, self.archive_dir_path) - require("readhistory"):updateItemByPath(document_full_path, dest_file) -- (will update "lastfile" if needed) - require("readcollection"):updateItemByPath(document_full_path, dest_file) + require("readhistory"):updateItem(document_full_path, dest_file) -- (will update "lastfile" if needed) + require("readcollection"):updateItem(document_full_path, dest_file) end DocSettings.updateLocation(document_full_path, dest_file, do_copy) UIManager:show(ConfirmBox:new{