Fix possible race condition on windows when changing title/author during move of book files

This commit is contained in:
Kovid Goyal 2010-09-17 12:04:59 -06:00
parent 6566014a8b
commit e76211e0a2

View File

@ -439,7 +439,8 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
if not f:
continue
stream = cStringIO.StringIO(f)
self.add_format(id, format, stream, index_is_id=True, path=tpath)
self.add_format(id, format, stream, index_is_id=True,
path=tpath, notify=False)
self.conn.execute('UPDATE books SET path=? WHERE id=?', (path, id))
if commit:
self.conn.commit()