mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't write log files when exporting
This commit is contained in:
parent
65cfcf9226
commit
16be20e2fa
2 changed files with 4 additions and 4 deletions
|
@ -32,6 +32,7 @@ def Collection(
|
|||
path: str,
|
||||
backend: Optional[RustBackend] = None,
|
||||
server: Optional[ServerData] = None,
|
||||
log: bool = False,
|
||||
) -> _Collection:
|
||||
"Open a new or existing collection. Path must be unicode."
|
||||
assert path.endswith(".anki2")
|
||||
|
@ -40,7 +41,7 @@ def Collection(
|
|||
|
||||
(media_dir, media_db) = media_paths_from_col_path(path)
|
||||
log_path = ""
|
||||
if not server:
|
||||
if not server and log:
|
||||
log_path = path.replace(".anki2", "2.log")
|
||||
path = os.path.abspath(path)
|
||||
|
||||
|
|
|
@ -475,13 +475,12 @@ close the profile or restart Anki."""
|
|||
return True
|
||||
|
||||
def _loadCollection(self):
|
||||
cpath = self.pm.collectionPath()
|
||||
self.col = Collection(cpath, backend=self.backend)
|
||||
self.reopen()
|
||||
self.setEnabled(True)
|
||||
|
||||
def reopen(self):
|
||||
cpath = self.pm.collectionPath()
|
||||
self.col = Collection(cpath, backend=self.backend)
|
||||
self.col = Collection(cpath, backend=self.backend, log=True)
|
||||
|
||||
def unloadCollection(self, onsuccess: Callable) -> None:
|
||||
def callback():
|
||||
|
|
Loading…
Reference in a new issue