From 2803432ac1bff883b94b99930fed43351f4da215 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Sun, 2 Jun 2019 16:16:15 +0200 Subject: [PATCH] Minor Linux fixes - Now supporting both " and ' in escaped paths - The app-name filter now uses os.sep instead of "\\" --- UniversalModloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UniversalModloader.py b/UniversalModloader.py index 4e7d3fa..ac6ae13 100644 --- a/UniversalModloader.py +++ b/UniversalModloader.py @@ -336,7 +336,7 @@ def requestAppPath(): while True: clear() dir = input("Please insert a folder via Drag&Drop:\n") - dir = dir.replace('"',"") + if (dir[0] == '"' and dir[-1] == '"') or (dir[0] == "'" and dir[-1] == "'"): dir = dir[1:-1] if dir == "console": console() @@ -403,7 +403,7 @@ def setupVariables(): raise NameError("Folder not found: " +appPath) if os.path.isdir(appPath.replace(" - umlOriginal","")): appPath = appPath.replace(" - umlOriginal","") - appName = appPath.replace(os.path.dirname(appPath)+ "\\","") + appName = appPath.replace(os.path.dirname(appPath)+ os.sep,"") originalAppPath = appPath + " - umlOriginal" tmpAppPath = appPath + " - umlTemp" modPath = os.path.join(appPath + " - umlMods")