mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
Desktop: Fixes #6692: Fixed file and directory paths in plugin setting dialogs
This commit is contained in:
parent
8b91427056
commit
6a4eb33093
@ -484,13 +484,19 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
||||
} else {
|
||||
const paths = await bridge().showOpenDialog();
|
||||
if (!paths || !paths.length) return;
|
||||
const cmd = splitCmd(this.state.settings[key]);
|
||||
cmd[0] = paths[0];
|
||||
updateSettingValue(key, joinCmd(cmd));
|
||||
|
||||
if (md.subType === 'file_path') {
|
||||
updateSettingValue(key, paths[0]);
|
||||
} else {
|
||||
const cmd = splitCmd(this.state.settings[key]);
|
||||
cmd[0] = paths[0];
|
||||
updateSettingValue(key, joinCmd(cmd));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const cmd = splitCmd(this.state.settings[key]);
|
||||
const path = md.subType === 'file_path_and_args' ? cmd[0] : this.state.settings[key];
|
||||
|
||||
const argComp = md.subType !== 'file_path_and_args' ? null : (
|
||||
<div style={{ ...rowStyle, marginBottom: 5 }}>
|
||||
@ -526,7 +532,7 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
||||
onChange={(event: any) => {
|
||||
onPathChange(event);
|
||||
}}
|
||||
value={cmd[0]}
|
||||
value={path}
|
||||
spellCheck={false}
|
||||
/>
|
||||
<Button
|
||||
|
Loading…
Reference in New Issue
Block a user