From 8e93e41ad2096ec107e85d2be1c472d85441206d Mon Sep 17 00:00:00 2001 From: Daniel Wong Date: Sun, 26 May 2019 16:49:49 +1000 Subject: [PATCH] Detect if the installer is being run from an excessively long path on Windows, as that can cause the install to fail. Tell user to move the installer to a shorter path. --- main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.py b/main.py index 28b10f85..6bf3a382 100644 --- a/main.py +++ b/main.py @@ -42,6 +42,15 @@ common.Globals.getBuildInfo() print("Installer Build Information:") print(common.Globals.BUILD_INFO) + print("Installer is being run from: [{}]".format(os.getcwd())) + + if common.Globals.IS_WINDOWS and len(os.getcwd()) > 100: + print("\n\n---------------------------------------------------------------------------------") + print("ERROR: The path you are running the installer from is too long!") + print("It is currently {} characters long, but must be less than 100 characters".format(len(os.getcwd()))) + print("Please move the installer to a shorter path. The current path is:") + print(os.getcwd()) + common.exitWithError() def check07thModServerConnection(): """