Run windows_repair using atexit

Makes it even more likely the parent process quits before the restore
process starts restoring.
This commit is contained in:
Kovid Goyal 2024-05-09 19:06:10 +05:30
parent 9a2d3e6d9f
commit ecb617366d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -336,7 +336,8 @@ class GuiRunner(QObject):
# On some windows systems the existing db file gets locked # On some windows systems the existing db file gets locked
# by something when running restore from the main process. # by something when running restore from the main process.
# So run the restore in a separate process. # So run the restore in a separate process.
windows_repair(self.library_path) import atexit
atexit.register(windows_repair, self.library_path)
self.app.quit() self.app.quit()
return return
if repair_library(self.library_path): if repair_library(self.library_path):