From 4efb6003dcf6d31d3ba37de37f4db5296b966db6 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 5 Jan 2023 11:05:23 +0000 Subject: [PATCH] Desktop: Fixes #7018: Plugin API DirectoryPath edit problems when path contain spaces --- packages/app-desktop/gui/ConfigScreen/ConfigScreen.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/app-desktop/gui/ConfigScreen/ConfigScreen.tsx b/packages/app-desktop/gui/ConfigScreen/ConfigScreen.tsx index 6fc4002d3..be7fc6c29 100644 --- a/packages/app-desktop/gui/ConfigScreen/ConfigScreen.tsx +++ b/packages/app-desktop/gui/ConfigScreen/ConfigScreen.tsx @@ -467,9 +467,13 @@ class ConfigScreenComponent extends React.Component { }; const onPathChange = (event: any) => { - const cmd = splitCmd(this.state.settings[key]); - cmd[0] = event.target.value; - updateSettingValue(key, joinCmd(cmd)); + if (md.subType === 'file_path_and_args') { + const cmd = splitCmd(this.state.settings[key]); + cmd[0] = event.target.value; + updateSettingValue(key, joinCmd(cmd)); + } else { + updateSettingValue(key, event.target.value); + } }; const onArgsChange = (event: any) => {