fix another downgrade+upgrade bug
This commit is contained in:
parent
1cb2aa077a
commit
999c53b5ec
@ -97,7 +97,10 @@ create table meta (dirMod int, lastUsn int); insert into meta values (0, 0);
|
||||
# anew
|
||||
self.col.log("failed to import old media db:"+traceback.format_exc())
|
||||
self.db.execute("detach old")
|
||||
os.rename("../collection.media.db", "../collection.media.db.old")
|
||||
npath = "../collection.media.db.old"
|
||||
if os.path.exists(npath):
|
||||
os.unlink(npath)
|
||||
os.rename("../collection.media.db", npath)
|
||||
|
||||
def close(self):
|
||||
if self.col.server:
|
||||
|
Loading…
Reference in New Issue
Block a user