mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 15:48:00 +01:00
Fix IO.expandPath quirk on MS
This commit is contained in:
@@ -944,7 +944,7 @@ IO.expandPath = function (path, relative)
|
|||||||
path = expand(path);
|
path = expand(path);
|
||||||
|
|
||||||
// expand ~
|
// expand ~
|
||||||
if (!relative && (WINDOWS ? /^~(?:$|\\)/ : /^~(?:$|\/)/).test(path))
|
if (!relative && (WINDOWS ? /^~(?:$|[\\\/])/ : /^~(?:$|\/)/).test(path))
|
||||||
{
|
{
|
||||||
// Try $HOME first, on all systems
|
// Try $HOME first, on all systems
|
||||||
let home = services.get("environment").get("HOME");
|
let home = services.get("environment").get("HOME");
|
||||||
@@ -961,9 +961,10 @@ IO.expandPath = function (path, relative)
|
|||||||
// after, but doesn't document it. Is this just a bug? --Kris
|
// after, but doesn't document it. Is this just a bug? --Kris
|
||||||
path = expand(path);
|
path = expand(path);
|
||||||
|
|
||||||
// FIXME: Should we be doing this here? I think it should be done
|
if (WINDOWS)
|
||||||
// by the arg parser or nowhere. --Kris
|
path = path.replace("/", "\\", "g");
|
||||||
return path.replace("\\ ", " ", "g");
|
|
||||||
|
return path;
|
||||||
};
|
};
|
||||||
|
|
||||||
// vim: set fdm=marker sw=4 ts=4 et:
|
// vim: set fdm=marker sw=4 ts=4 et:
|
||||||
|
|||||||
@@ -1225,6 +1225,7 @@ const liberator = (function () //{{{
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
let infoPath = services.create("file");
|
let infoPath = services.create("file");
|
||||||
|
liberator.dump("'rtp': " + IO.expandPath(IO.runtimePath.replace(/,.*/, "")));
|
||||||
infoPath.initWithPath(IO.expandPath(IO.runtimePath.replace(/,.*/, "")));
|
infoPath.initWithPath(IO.expandPath(IO.runtimePath.replace(/,.*/, "")));
|
||||||
infoPath.append("info");
|
infoPath.append("info");
|
||||||
infoPath.append(services.get("profile").selectedProfile.name);
|
infoPath.append(services.get("profile").selectedProfile.name);
|
||||||
|
|||||||
Reference in New Issue
Block a user