1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-30 05:53:32 +02:00

Fix escaped path separator in messages on Windows.

This commit is contained in:
Doug Kearns
2009-03-01 02:49:18 +11:00
parent b3a5f279fc
commit f82b03f796
4 changed files with 15 additions and 17 deletions

View File

@@ -639,7 +639,7 @@ function Events() //{{{
{ {
for (let [,dir] in Iterator(dirs)) for (let [,dir] in Iterator(dirs))
{ {
liberator.echomsg('Searching for "macros/*" in ' + dir.path.quote(), 2); liberator.echomsg('Searching for "macros/*" in "' + dir.path + '"', 2);
liberator.log("Sourcing macros directory: " + dir.path + "...", 3); liberator.log("Sourcing macros directory: " + dir.path + "...", 3);

View File

@@ -250,7 +250,7 @@ function IO() //{{{
if (!found) if (!found)
{ {
liberator.echoerr("E344: Can't find directory " + arg.quote() + " in cdpath\n" liberator.echoerr("E344: Can't find directory \"" + arg + "\" in cdpath\n"
+ "E472: Command failed"); + "E472: Command failed");
} }
} }
@@ -283,7 +283,7 @@ function IO() //{{{
if (file.exists() && !args.bang) if (file.exists() && !args.bang)
{ {
liberator.echoerr("E189: " + filename.quote() + " exists (add ! to override)"); liberator.echoerr("E189: \"" + filename + "\" exists (add ! to override)");
return; return;
} }
@@ -302,7 +302,7 @@ function IO() //{{{
} }
catch (e) catch (e)
{ {
liberator.echoerr("E190: Cannot open " + filename.quote() + " for writing"); liberator.echoerr("E190: Cannot open \"" + filename + "\" for writing");
liberator.log("Could not write to " + file.path + ": " + e.message); // XXX liberator.log("Could not write to " + file.path + ": " + e.message); // XXX
} }
}, },
@@ -524,7 +524,7 @@ function IO() //{{{
if (!dir.exists() || !dir.isDirectory()) if (!dir.exists() || !dir.isDirectory())
{ {
liberator.echoerr("E344: Can't find directory " + dir.path.quote() + " in path"); liberator.echoerr("E344: Can't find directory \"" + dir.path + "\" in path");
return null; return null;
} }
@@ -842,7 +842,7 @@ lookup:
let found = false; let found = false;
// FIXME: should use original arg string // FIXME: should use original arg string
liberator.echomsg("Searching for " + paths.join(" ").quote() + " in " + options["runtimepath"].quote(), 2); liberator.echomsg("Searching for \"" + paths.join(" ") + "\" in \"" + options["runtimepath"] + "\"", 2);
outer: outer:
for (let [,dir] in Iterator(dirs)) for (let [,dir] in Iterator(dirs))
@@ -851,7 +851,7 @@ lookup:
{ {
let file = joinPaths(dir, path); let file = joinPaths(dir, path);
liberator.echomsg("Searching for " + file.path.quote(), 3); liberator.echomsg("Searching for \"" + file.path + "\"", 3);
if (file.exists() && file.isFile() && file.isReadable()) if (file.exists() && file.isFile() && file.isReadable())
{ {
@@ -865,7 +865,7 @@ lookup:
} }
if (!found) if (!found)
liberator.echomsg("not found in 'runtimepath': " + paths.join(" ").quote(), 1); // FIXME: should use original arg string liberator.echomsg("not found in 'runtimepath': \"" + paths.join(" ") + "\"", 1); // FIXME: should use original arg string
return found; return found;
}, },
@@ -892,9 +892,9 @@ lookup:
if (!silent) if (!silent)
{ {
if (file.exists() && file.isDirectory()) if (file.exists() && file.isDirectory())
liberator.echomsg("Cannot source a directory: " + filename.quote(), 0); liberator.echomsg("Cannot source a directory: \"" + filename + "\"", 0);
else else
liberator.echomsg("could not source: " + filename.quote(), 1); liberator.echomsg("could not source: \"" + filename + "\"", 1);
liberator.echoerr("E484: Can't open file " + filename); liberator.echoerr("E484: Can't open file " + filename);
} }
@@ -902,7 +902,7 @@ lookup:
return; return;
} }
liberator.echomsg("sourcing " + filename.quote(), 2); liberator.echomsg("sourcing \"" + filename + "\"", 2);
let str = self.readFile(file); let str = self.readFile(file);
let uri = services.get("io").newFileURI(file); let uri = services.get("io").newFileURI(file);
@@ -1012,7 +1012,7 @@ lookup:
if (scriptNames.indexOf(file.path) == -1) if (scriptNames.indexOf(file.path) == -1)
scriptNames.push(file.path); scriptNames.push(file.path);
liberator.echomsg("finished sourcing " + filename.quote(), 2); liberator.echomsg("finished sourcing \"" + filename + "\"", 2);
liberator.log("Sourced: " + filename, 3); liberator.log("Sourced: " + filename, 3);
} }

View File

@@ -1029,11 +1029,11 @@ const liberator = (function () //{{{
return; return;
} }
liberator.echomsg('Searching for "plugin/**/*.{js,vimp}" in ' liberator.echomsg('Searching for "plugin/**/*.{js,vimp}" in "'
+ [dir.path.replace(/.plugin$/, "") for each (dir in dirs)].join(",").quote(), 2); + [dir.path.replace(/.plugin$/, "") for each (dir in dirs)].join(",") + '"', 2);
dirs.forEach(function (dir) { dirs.forEach(function (dir) {
liberator.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); liberator.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3);
sourceDirectory(dir); sourceDirectory(dir);
}); });
}, },

View File

@@ -37,8 +37,6 @@ BUGS:
- completion height is broken, try :a<tab>....<tab>, when it wraps it's totally off. - completion height is broken, try :a<tab>....<tab>, when it wraps it's totally off.
and even if it is not totally off, i had it jump by one pixel when wrapping around. and even if it is not totally off, i had it jump by one pixel when wrapping around.
If that's unfixable, i propose reverting the new completion height stuff. If that's unfixable, i propose reverting the new completion height stuff.
- Windows paths have escaped backslashes in messages - presumably due to
String#quote change.
- :messages is _very_ slow for message history of several thousand lines -> - :messages is _very_ slow for message history of several thousand lines ->
Unresponsive Script: util.js:79 (sometimes xmlToDom() and elsewhere) Unresponsive Script: util.js:79 (sometimes xmlToDom() and elsewhere)
- :hardcopy! seems to be broken for me - :hardcopy! seems to be broken for me