From fa7fe6cab03705f797444084841c5c98fd888faf Mon Sep 17 00:00:00 2001 From: Chinch-Bug <77509218+Chinch-Bug@users.noreply.github.com> Date: Wed, 19 Jun 2024 18:57:24 +0300 Subject: [PATCH] still trying to fix the image saving --- main.py | 1 - scripts/screens/save_image.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index b677e0e..4c9e575 100644 --- a/main.py +++ b/main.py @@ -3,7 +3,6 @@ directory = os.path.dirname(__file__) if directory: os.chdir(directory) -os.makedirs('/saved_images', exist_ok=True) import pygame import scripts.global_vars as global_vars import scripts.game_structure.game_essentials diff --git a/scripts/screens/save_image.py b/scripts/screens/save_image.py index 4786e26..ce561f9 100644 --- a/scripts/screens/save_image.py +++ b/scripts/screens/save_image.py @@ -102,6 +102,8 @@ def save_image(self): file_name = self.file_name file_number = "" i = 0 + + os.makedirs('./saved_images', exist_ok=True) while True: if os.path.isfile(f"{'./saved_images'}/{file_name + file_number}.png"): i += 1