From dd490ec3e95d3b5e6cb5b565ba1a994c311a2156 Mon Sep 17 00:00:00 2001 From: cuu Date: Sat, 19 Jan 2019 19:20:14 +0800 Subject: [PATCH] fix bug in CommercialSoftwarePackage --- sys.py/UI/CommercialSoftwarePackage/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys.py/UI/CommercialSoftwarePackage/__init__.py b/sys.py/UI/CommercialSoftwarePackage/__init__.py index 120cca9..380b72b 100644 --- a/sys.py/UI/CommercialSoftwarePackage/__init__.py +++ b/sys.py/UI/CommercialSoftwarePackage/__init__.py @@ -249,7 +249,10 @@ class MyCommercialSoftwarePackage(object): return ret cur_dir = os.getcwd() - os.chdir(json_config["GameDir"]) + + if FileExists(json_config["GameDir"]): + os.chdir(json_config["GameDir"]) + if "MD5" in json_config: for i,v in enumerate(json_config["MD5"]): if FileExists(v):