MoveToArchive fix DocSettings (#10152)

This commit is contained in:
hius07
2023-02-22 14:28:40 +02:00
committed by GitHub
parent d0b78c01aa
commit 54fc6533b1

View File

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