1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-30 04:25:46 +01:00

Fix joinPaths when stuff dun't exist

This commit is contained in:
Kris Maglione
2008-12-16 17:24:18 -05:00
parent 83b30172f8
commit 672e109c67
2 changed files with 12 additions and 5 deletions

View File

@@ -118,9 +118,16 @@ function IO() //{{{
function joinPaths(head, tail)
{
let path = ioManager.getFile(head);
path.appendRelativePath(ioManager.expandPath(tail)); // FIXME: should only expand env vars and normalise path separators
if (path.exists())
path.normalize();
try
{
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;
}
@@ -943,7 +950,7 @@ lookup:
liberator.echomsg("finished sourcing " + filename.quote(), 2);
liberator.log("Sourced: " + file.path, 3);
liberator.log("Sourced: " + filename, 3);
}
catch (e)
{