From e48251e75e8a2d37bedfd517d5cdcd0c0162bfc3 Mon Sep 17 00:00:00 2001 From: sczerniawski <39490863+sczerniawski@users.noreply.github.com> Date: Mon, 18 Sep 2023 08:15:35 +0200 Subject: [PATCH] Fix crash related to --latest-stamps (#2056) --- instaloader/lateststamps.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instaloader/lateststamps.py b/instaloader/lateststamps.py index 5846948..02959ba 100644 --- a/instaloader/lateststamps.py +++ b/instaloader/lateststamps.py @@ -27,7 +27,8 @@ class LatestStamps: self.data.read(latest_stamps_file) def _save(self): - makedirs(dirname(self.file), exist_ok=True) + if dn := dirname(self.file): + makedirs(dn, exist_ok=True) with open(self.file, 'w') as f: self.data.write(f)