1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

fix for #906, 1) windows paths like C:\a\b weren't accepted because b… (#935)

* fix for #906, 1) windows paths like C:\a\b weren't accepted because backslashes were treated as escape sequences, 2) common paths like C:\Program Files\Foo\Foo.exe weren't accepted because of the space in the path

* Using anothing approach,
a) backslashes are no longer treated as escape characters,
b) string change to remind people to add spaces

* Removing joplin.pot from the patch, it will be updated later.

* Removing unused code.
This commit is contained in:
Ben Fisher
2018-11-20 13:46:18 -08:00
committed by Laurent Cozic
parent 0a0afd7245
commit 58b68cab0c
3 changed files with 12 additions and 5 deletions

View File

@ -122,7 +122,12 @@ function wrap(text, indent, width) {
});
}
function splitCommandString(command) {
function splitCommandString(command, options = null) {
options = options || {};
if (!('handleEscape' in options)) {
options.handleEscape = true;
}
let args = [];
let state = "start"
let current = ""
@ -148,7 +153,7 @@ function splitCommandString(command) {
continue;
}
if (c == "\\") {
if (c == "\\" && options.handleEscape) {
escapeNext = true;
continue;
}