mirror of
https://github.com/koreader/koreader.git
synced 2026-12-05 19:48:08 +00:00
Moving (or deleting) the file while it's still being open in the reader causes problems: its metadata will be written to the old location when it's eventually closed, and I think I've seen crashes as well (don't quite remember but something like switching to File Browser and then using the Open Last Book function or something). The simplest solution is to just not archive it while it's still open. It will be archived on the next sync anyway. Alternatively, we could do what movetoarchive.koplugin does, and ask the user whether they want to open it from the new location (if archiving) or switch back to File Browser: https://github.com/koreader/koreader/blob/8c4d6c0a3ab8449ac65b413187d27d54f50fd946/plugins/movetoarchive.koplugin/main.lua#L153-L161 I don't think it's worth the complexity though — Move to Archive doing nothing is bad UX, obviously, but a Wallabag sync skipping one article until the next sync is fine, IMO. I suspect this might also be related to this TODO note: https://github.com/koreader/koreader/blob/8c4d6c0a3ab8449ac65b413187d27d54f50fd946/plugins/wallabag.koplugin/main.lua#L1428