Fix for windows path names

This commit is contained in:
niknah
2025-10-13 21:46:48 +11:00
parent d15034d05f
commit bdb06a9b95
4 changed files with 7 additions and 7 deletions
+4 -5
View File
@@ -41,6 +41,9 @@ class WebBuilder:
self.dest_path,
"components/tabs"
)
if not os.path.exists(self.tabs_path):
os.mkdir(self.tabs_path)
WebBuilder.exit_handler_done = False
self.userRequestedStopFile = os.path.join(
self.dest_path,
@@ -81,10 +84,6 @@ class WebBuilder:
f.write(s)
def make_tab_list(self):
tabs_path = os.path.join(
self.dest_path,
"components/tabs"
)
workflows_list_path = os.path.join(
self.tabs_path,
"WorkflowsList.js"
@@ -99,7 +98,7 @@ class WebBuilder:
with open(tab_list_path) as main:
tab_list_orig = main.read()
files = os.listdir(tabs_path)
files = os.listdir(self.tabs_path)
tab_classes = []
tab_classes_html = []
workflows_js = []
+1
View File
@@ -46,6 +46,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"PresentationComponent": "Presentation Component",
"PresentationDropDown": "Presentation DropDown",
"PresentationAdvancedSection": "Presentation Advanced Section",
"PresentationHistory": "Presentation History",
}
WebServer.WebServer().start()
+1 -1
View File
@@ -8,7 +8,7 @@ export default defineEventHandler(async (event) => {
q.set('email', userFolder);
}
let path = q.get('path');
const pathM = /^([^/]+)\/(.*)$/.exec(path);
const pathM = /^([^/\\]+)[\/\\](.*)$/.exec(path);
if (pathM) {
q.set('path', pathM[1]);
q.set('subfolder', pathM[2]);
@@ -16,7 +16,7 @@ export function linkTarget(node, id, inputName, workflowData, opts) {
// link input, output
val = join('..', inputPath, val);
} else {
const pathM = /^([^\/]+)\/(.*)$/.exec(inputPath);
const pathM = /^([^\/\\]+)[\/\\](.*)$/.exec(inputPath);
if (pathM) {
// link model. First path is the type
val = join(pathM[2], val);