mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix bugs in database migration logic
This commit is contained in:
parent
df8f2d88d0
commit
50c484fc35
@ -688,7 +688,11 @@ class Main(MainWindow, Ui_MainWindow):
|
|||||||
try:
|
try:
|
||||||
newloc = os.path.join(d.database_location, os.path.basename(self.database_path))
|
newloc = os.path.join(d.database_location, os.path.basename(self.database_path))
|
||||||
if not os.path.exists(newloc):
|
if not os.path.exists(newloc):
|
||||||
|
dirname = os.path.dirname(newloc)
|
||||||
|
if not os.path.isdir(dirname):
|
||||||
|
os.makedirs(dirname)
|
||||||
dest = open(newloc, 'wb')
|
dest = open(newloc, 'wb')
|
||||||
|
if os.access(self.database_path, os.R_OK):
|
||||||
self.status_bar.showMessage('Copying database to '+newloc)
|
self.status_bar.showMessage('Copying database to '+newloc)
|
||||||
self.setCursor(Qt.BusyCursor)
|
self.setCursor(Qt.BusyCursor)
|
||||||
self.library_view.setEnabled(False)
|
self.library_view.setEnabled(False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user