File: 03_checkdir.patch

package info (click to toggle)
renpy 8.3.4%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 86,772 kB
  • sloc: python: 55,363; ansic: 13,858; javascript: 849; makefile: 87; sh: 13
file content (21 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Markus Koschany <apo@debian.org>
Date: Sun, 7 Aug 2022 22:14:47 +0200
Subject: 03_checkdir

---
 renpy/main.py | 4 ++++
 1 file changed, 4 insertions(+)

--- a/renpy/main.py
+++ b/renpy/main.py
@@ -357,6 +357,10 @@
     if (renpy.android or renpy.ios) and not renpy.config.log_to_stdout:
         print("Version:", renpy.version)
 
+    # Check if the game directory exists and is a directory
+    if not os.path.isdir(renpy.config.gamedir):
+        raise Exception("The game directory '%s' doesn't exist" % renpy.config.gamedir)
+
     # Note the game directory.
     game.basepath = renpy.config.gamedir
     renpy.config.commondir = renpy.__main__.path_to_common(renpy.config.renpy_base) # E1101 @UndefinedVariable