Desktop: Fixes #7018: Plugin API DirectoryPath edit problems when path contain spaces

pull/7582/head
Laurent Cozic 2023-01-05 11:05:23 +00:00
parent f4f96cfe89
commit 4efb6003dc
1 changed files with 7 additions and 3 deletions

View File

@ -467,9 +467,13 @@ class ConfigScreenComponent extends React.Component<any, any> {
};
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) => {