MoveToArchive fix DocSettings (#10152)

reviewable/pr10159/r1
hius07 1 year ago committed by GitHub
parent d0b78c01aa
commit 54fc6533b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save