Fix exporting key to a path that doesn't exist yet

This commit is contained in:
miruka 2019-09-08 12:17:08 -04:00
parent df753b5262
commit aefb314999

View File

@ -345,9 +345,9 @@ class MatrixClient(nio.AsyncClient):
path = Path(outfile) path = Path(outfile)
path.parent.mkdir(parents=True, exist_ok=True) path.parent.mkdir(parents=True, exist_ok=True)
# Remove any existing file # The QML dialog asks the user if he wants to overwrite before this
# (the QML dialog asks the user if he wants to overwrite before this) if path.exists():
path.unlink() path.unlink()
await super().export_keys(outfile, passphrase) await super().export_keys(outfile, passphrase)