mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix v1 log appearing next to export
This commit is contained in:
parent
08f894735a
commit
e37774f0bd
2 changed files with 5 additions and 3 deletions
|
@ -63,9 +63,10 @@ class _Collection:
|
|||
db: DBProxy,
|
||||
backend: RustBackend,
|
||||
server: Optional["anki.storage.ServerData"] = None,
|
||||
log: bool = False,
|
||||
) -> None:
|
||||
self.backend = backend
|
||||
self._debugLog = not server
|
||||
self._debugLog = log
|
||||
self.db = db
|
||||
self.path = db._path
|
||||
self._openLog()
|
||||
|
|
|
@ -41,7 +41,8 @@ def Collection(
|
|||
|
||||
(media_dir, media_db) = media_paths_from_col_path(path)
|
||||
log_path = ""
|
||||
if not server and log:
|
||||
should_log = not server and log
|
||||
if should_log:
|
||||
log_path = path.replace(".anki2", "2.log")
|
||||
path = os.path.abspath(path)
|
||||
|
||||
|
@ -55,7 +56,7 @@ def Collection(
|
|||
initial_db_setup(db)
|
||||
|
||||
# add db to col and do any remaining upgrades
|
||||
col = _Collection(db, backend=backend, server=server)
|
||||
col = _Collection(db, backend=backend, server=server, log=should_log)
|
||||
if create:
|
||||
# add in reverse order so basic is default
|
||||
addClozeModel(col)
|
||||
|
|
Loading…
Reference in a new issue