From 6805df858efb279b4a2031f79a88f1afa136ab9f Mon Sep 17 00:00:00 2001 From: dadav <33197631+dadav@users.noreply.github.com> Date: Wed, 15 Apr 2020 08:20:47 +0200 Subject: [PATCH] basename should be dirname --- pwnagotchi/ui/web/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/ui/web/__init__.py b/pwnagotchi/ui/web/__init__.py index 7d5f4a0..533f2f7 100644 --- a/pwnagotchi/ui/web/__init__.py +++ b/pwnagotchi/ui/web/__init__.py @@ -9,7 +9,7 @@ frame_lock = Lock() def update_frame(img): global frame_lock, frame_path, frame_format - if not os.path.exists(os.path.basename(frame_path)): - os.makedirs(os.path.basename(frame_path)) + if not os.path.exists(os.path.dirname(frame_path)): + os.makedirs(os.path.dirname(frame_path)) with frame_lock: img.save(frame_path, format=frame_format)