Better path escaping

This commit is contained in:
Ivan Kravets
2017-05-28 13:12:59 +03:00
parent 641c981c4b
commit 68d7630b44
3 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@
import sys import sys
VERSION = (3, 4, "0b7") VERSION = (3, 4, "0b8")
__version__ = ".".join([str(s) for s in VERSION]) __version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio" __title__ = "platformio"

View File

@ -12,7 +12,7 @@
% end % end
"includePath": [ "includePath": [
% for include in includes: % for include in includes:
"{{include.replace('"', '\\"').replace('\\\\', '/').replace('\\', '/')}}", "{{include.replace('\\\\', '/').replace('\\', '/').replace('"', '\\"')}}",
% end % end
"" ""
], ],
@ -21,7 +21,7 @@
"databaseFilename": "", "databaseFilename": "",
"path": [ "path": [
% for include in includes: % for include in includes:
"{{include.replace('"', '\\"').replace('\\\\', '/').replace('\\', '/')}}", "{{include.replace('\\\\', '/').replace('\\', '/').replace('"', '\\"')}}",
% end % end
"" ""
] ]

View File

@ -7,8 +7,8 @@
"request": "launch", "request": "launch",
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
"name": "PlatformIO Debugger", "name": "PlatformIO Debugger",
"target": "{{prog_path.replace('"', '\\"').replace('\\\\', '/').replace('\\', '/')}}", "target": "{{prog_path.replace('\\\\', '/').replace('\\', '/').replace('"', '\\"')}}",
"gdbpath": "{{join(dirname(platformio_path), "piodebuggdb").replace('"', '\\"').replace('\\\\', '/').replace('\\', '/')}}", "gdbpath": "{{join(dirname(platformio_path), "piodebuggdb").replace('\\\\', '/').replace('\\', '/').replace('"', '\\"')}}",
"autorun": [ "source .pioinit" ] "autorun": [ "source .pioinit" ]
} }
] ]