Skip to content

Commit

Permalink
still trying to fix the image saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinch-Bug committed Jun 19, 2024
1 parent 2bc78c1 commit fa7fe6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions scripts/screens/save_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa7fe6c

Please sign in to comment.