mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-01 13:05:45 +01:00
Fix joinPaths when stuff dun't exist
This commit is contained in:
@@ -118,9 +118,16 @@ function IO() //{{{
|
|||||||
function joinPaths(head, tail)
|
function joinPaths(head, tail)
|
||||||
{
|
{
|
||||||
let path = ioManager.getFile(head);
|
let path = ioManager.getFile(head);
|
||||||
path.appendRelativePath(ioManager.expandPath(tail)); // FIXME: should only expand env vars and normalise path separators
|
try
|
||||||
if (path.exists())
|
{
|
||||||
path.normalize();
|
path.appendRelativePath(ioManager.expandPath(tail)); // FIXME: should only expand env vars and normalise path separators
|
||||||
|
if (path.exists())
|
||||||
|
path.normalize();
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
return { exists: function () false };
|
||||||
|
}
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -943,7 +950,7 @@ lookup:
|
|||||||
|
|
||||||
liberator.echomsg("finished sourcing " + filename.quote(), 2);
|
liberator.echomsg("finished sourcing " + filename.quote(), 2);
|
||||||
|
|
||||||
liberator.log("Sourced: " + file.path, 3);
|
liberator.log("Sourced: " + filename, 3);
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -683,7 +683,7 @@ function Options() //{{{
|
|||||||
context.completions = [
|
context.completions = [
|
||||||
[loadPreference(filter, null, false), "Current Value"],
|
[loadPreference(filter, null, false), "Current Value"],
|
||||||
[loadPreference(filter, null, true), "Default Value"]
|
[loadPreference(filter, null, true), "Default Value"]
|
||||||
];
|
].filter(function ([k]) k != null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user