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,
|
db: DBProxy,
|
||||||
backend: RustBackend,
|
backend: RustBackend,
|
||||||
server: Optional["anki.storage.ServerData"] = None,
|
server: Optional["anki.storage.ServerData"] = None,
|
||||||
|
log: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.backend = backend
|
self.backend = backend
|
||||||
self._debugLog = not server
|
self._debugLog = log
|
||||||
self.db = db
|
self.db = db
|
||||||
self.path = db._path
|
self.path = db._path
|
||||||
self._openLog()
|
self._openLog()
|
||||||
|
|
|
@ -41,7 +41,8 @@ def Collection(
|
||||||
|
|
||||||
(media_dir, media_db) = media_paths_from_col_path(path)
|
(media_dir, media_db) = media_paths_from_col_path(path)
|
||||||
log_path = ""
|
log_path = ""
|
||||||
if not server and log:
|
should_log = not server and log
|
||||||
|
if should_log:
|
||||||
log_path = path.replace(".anki2", "2.log")
|
log_path = path.replace(".anki2", "2.log")
|
||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ def Collection(
|
||||||
initial_db_setup(db)
|
initial_db_setup(db)
|
||||||
|
|
||||||
# add db to col and do any remaining upgrades
|
# 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:
|
if create:
|
||||||
# add in reverse order so basic is default
|
# add in reverse order so basic is default
|
||||||
addClozeModel(col)
|
addClozeModel(col)
|
||||||
|
|
Loading…
Reference in a new issue