From 0adfe7a43924000c27ea3b7cf00d8921597b9deb Mon Sep 17 00:00:00 2001 From: Yifan Liu Date: Tue, 17 May 2022 08:45:05 +0800 Subject: [PATCH] misc: configurator: Fix user-input working directory not working User-input working directory will not work if there's no path split at the end. This patch checks and adds if no path split at the end of working directory path. Tracked-On: #7484 Signed-off-by: Yifan Liu --- .../configurator/src/pages/Welcome/NewConfiguration.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/config_tools/configurator/packages/configurator/src/pages/Welcome/NewConfiguration.vue b/misc/config_tools/configurator/packages/configurator/src/pages/Welcome/NewConfiguration.vue index 910de21e9..e7949b17c 100644 --- a/misc/config_tools/configurator/packages/configurator/src/pages/Welcome/NewConfiguration.vue +++ b/misc/config_tools/configurator/packages/configurator/src/pages/Welcome/NewConfiguration.vue @@ -59,6 +59,9 @@ export default { if (folderPath[0] === '~') { folderPath = window.systemInfo.homeDir + window.systemInfo.pathSplit + folderPath.substring(1) } + if (folderPath.charAt(folderPath.length - 1) !== window.systemInfo.pathSplit) { + folderPath = folderPath + window.systemInfo.pathSplit; + } this.WorkingFolder = folderPath; configurator.readDir(folderPath, false)