mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix regression in database moving code
This commit is contained in:
parent
a80e06fbdb
commit
222d3fa2f3
@ -849,13 +849,14 @@ class Main(MainWindow, Ui_MainWindow):
|
|||||||
db = LibraryDatabase(newloc)
|
db = LibraryDatabase(newloc)
|
||||||
db.close()
|
db.close()
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
|
traceback.print_exc()
|
||||||
d = error_dialog(self, _('Invalid database'),
|
d = error_dialog(self, _('Invalid database'),
|
||||||
_('<p>An invalid database already exists at %s, delete it before trying to move the existing database.<br>Error: %s')%(newloc, str(err)))
|
_('<p>An invalid database already exists at %s, delete it before trying to move the existing database.<br>Error: %s')%(newloc, str(err)))
|
||||||
|
d.exec_()
|
||||||
newloc = self.database_path
|
newloc = self.database_path
|
||||||
self.database_path = newloc
|
self.database_path = newloc
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
settings.setValue("database path", QVariant(self.database_path))
|
settings.setValue("database path", QVariant(self.database_path))
|
||||||
os.unlink(src.name)
|
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
d = error_dialog(self, _('Could not move database'), unicode(err))
|
d = error_dialog(self, _('Could not move database'), unicode(err))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user