mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fix creating an empty library with the same structure as current library not creating custom columns on the first restart after creating the new custom columns. Fixes #1641278 [Custom columns don't copy on create new library](https://bugs.launchpad.net/calibre/+bug/1641278)
This commit is contained in:
parent
9d57aa4e33
commit
ac45db67c9
@ -641,6 +641,8 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
|
||||
default_prefs = olddb.prefs
|
||||
except:
|
||||
olddb = None
|
||||
if copy_structure and olddb is not None and default_prefs is not None:
|
||||
default_prefs['field_metadata'] = olddb.new_api.field_metadata.all_metadata()
|
||||
try:
|
||||
db = LibraryDatabase(newloc, default_prefs=default_prefs)
|
||||
except apsw.Error:
|
||||
|
Loading…
x
Reference in New Issue
Block a user