From 4a920724d9c04063d0dba681532ad8841af8cb43 Mon Sep 17 00:00:00 2001 From: ebolam Date: Fri, 10 Jun 2022 09:12:04 -0400 Subject: [PATCH] fix for folder paths on linux --- aiserver.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aiserver.py b/aiserver.py index baaca551..9b9a1c76 100644 --- a/aiserver.py +++ b/aiserver.py @@ -379,9 +379,9 @@ def get_folder_path_info(base): if path[-1] == "\\": path = path[:-1] breadcrumbs = [] - for i in range(len(path.split("\\"))): - breadcrumbs.append(["\\".join(path.split("\\")[:i+1]), - path.split("\\")[i]]) + for i in range(len(path.replace("/", "\\").split("\\"))): + breadcrumbs.append(["\\".join(path.replace("/", "\\").split("\\")[:i+1]), + path.replace("/", "\\").split("\\")[i]]) if len(breadcrumbs) == 1: breadcrumbs = [["{}:\\".format(chr(i)), "{}:\\".format(chr(i))] for i in range(65, 91) if os.path.exists("{}:".format(chr(i)))] else: @@ -395,6 +395,7 @@ def get_folder_path_info(base): # Paths/breadcrumbs is a list of lists, where the first element in the sublist is the full path and the second is the folder name return (paths, breadcrumbs) + def getModelSelection(modellist): print(" # Model\t\t\t\t\t\tVRAM\n ========================================================") i = 1