diff --git a/plugins/movetoarchive.koplugin/main.lua b/plugins/movetoarchive.koplugin/main.lua index 820bed3c8..4d1324aec 100644 --- a/plugins/movetoarchive.koplugin/main.lua +++ b/plugins/movetoarchive.koplugin/main.lua @@ -103,12 +103,11 @@ function MoveToArchive:commonProcess(is_move_process, moved_done_text) self.ui:onClose() if is_move_process then FileManager:moveFile(document_full_path, self.archive_dir_path) - FileManager:moveFile(DocSettings:getSidecarDir(document_full_path), self.archive_dir_path) else FileManager:copyFileFromTo(document_full_path, self.archive_dir_path) - FileManager:copyRecursive(DocSettings:getSidecarDir(document_full_path), self.archive_dir_path) end local dest_file = string.format("%s%s", self.archive_dir_path, filename) + DocSettings:update(document_full_path, dest_file, not is_move_process) ReadHistory:updateItemByPath(document_full_path, dest_file) -- (will update "lastfile" if needed) ReadCollection:updateItemByPath(document_full_path, dest_file) UIManager:show(ConfirmBox:new{