Fix bug in exporting records (#3545)

Introduced in #3392
This commit is contained in:
miggland 2022-08-16 04:09:00 +02:00 committed by GitHub
parent 8ef5d0a159
commit 858d48afe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,7 +267,7 @@ def export_records(c, filename='data.json', overwrite=False, include_permissions
print(f"Exporting database records to file '{filename}'")
if filename.exists() and overwrite is False:
if Path(filename).is_file() and overwrite is False:
response = input("Warning: file already exists. Do you want to overwrite? [y/N]: ")
response = str(response).strip().lower()