Skip to content

Commit b64a026

Browse files
author
Todd Whiteman
committed
macros: ensure paths are quoted on Windows
1 parent 09f5963 commit b64a026

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scc_annotate.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* @source https://github.com/Komodo/macros
1313
* @author Todd Whiteman
14-
* @version 0.2
14+
* @version 0.3
1515
*/
1616

1717
// Scintilla margin parameters.
@@ -93,6 +93,11 @@ var FetchAnnotationLines = function(koFileEx) {
9393
getService(Components.interfaces.koISCC);
9494
var scc_executable = sccSvc.executable || sccSvc.name;
9595
var filename = koFileEx.leafName;
96+
// Double quote the paths on Windows.
97+
if (navigator.platform.startsWith("Win")) {
98+
scc_executable = '"' + scc_executable + '"';
99+
filename = '"' + filename + '"';
100+
}
96101
var cmd = scc_executable + ' annotate ' + filename;
97102
var runSvc = Components.classes["@activestate.com/koRunService;1"].
98103
getService(Components.interfaces.koIRunService);

0 commit comments

Comments
 (0)