mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix Mnemosyne importer clobbering source file
This commit is contained in:
parent
7a1508adb7
commit
bc69f689ab
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ class MnemosyneImporter(Importer):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def do_import(mw: aqt.main.AnkiQt, path: str) -> None:
|
def do_import(mw: aqt.main.AnkiQt, path: str) -> None:
|
||||||
def on_success(json: str) -> None:
|
def on_success(json: str) -> None:
|
||||||
json_path = os.path.join(tmpdir(), path)
|
json_path = os.path.join(tmpdir(), os.path.basename(path))
|
||||||
with open(json_path, "wb") as file:
|
with open(json_path, "wb") as file:
|
||||||
file.write(json.encode("utf8"))
|
file.write(json.encode("utf8"))
|
||||||
ImportDialog(mw, JsonFileArgs(path=json_path))
|
ImportDialog(mw, JsonFileArgs(path=json_path))
|
||||||
|
|
Loading…
Reference in a new issue