From 4787da9ea129a9c4c7e72fb219cee3a126ecb57d Mon Sep 17 00:00:00 2001 From: Frederico Freire Boaventura <54273+fboaventura@users.noreply.github.com> Date: Mon, 2 Sep 2024 18:28:48 -0300 Subject: [PATCH] Fix the tilde expansion for user home folder (#550) This will enable the tilde expansion to map the output dir to the home user using `~/path`. --- parsedmarc/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index 98a29a1..304fb8d 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -1725,6 +1725,7 @@ def save_output(results, output_directory="output", aggregate_reports = results["aggregate_reports"] forensic_reports = results["forensic_reports"] smtp_tls_reports = results["smtp_tls_reports"] + output_directory = os.path.expanduser(output_directory) if os.path.exists(output_directory): if not os.path.isdir(output_directory):