From 7ac3eb8958e98ca6af2f042a95f55570f1a0097b Mon Sep 17 00:00:00 2001 From: raphael60650 Date: Thu, 18 Nov 2021 21:40:03 +0100 Subject: [PATCH] added an error if the select rom does not exists --- source/Gui.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/Gui.py b/source/Gui.py index 29c50a8..da935cb 100644 --- a/source/Gui.py +++ b/source/Gui.py @@ -190,7 +190,12 @@ class Gui: def nothread_use_path(): self.frame_action.grid_forget() try: - self.game.set_path(entry_game_path.get()) + game_path = entry_game_path.get() + if not os.path.exists(game_path): + messagebox.showerror(self.translate("Error"), self.translate("This file does not exist.")) + return + + self.game.set_path(game_path) self.progress(show=True, indeter=True, statut=self.translate("Extracting the game...")) self.game.extract() self.frame_action.grid(row=3, column=1, sticky="NEWS")