Merge pull request #1050 from metsjeesus/ssl_bundle
Fix to helper.expandhome to correctly resolve "" and undefined
This commit is contained in:
commit
f5dc6cc28f
@ -101,6 +101,9 @@ function ip2hex(address) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function expandHome(shortenedPath) {
|
function expandHome(shortenedPath) {
|
||||||
|
if (!shortenedPath) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
var home;
|
var home;
|
||||||
|
|
||||||
if (os.homedir) {
|
if (os.homedir) {
|
||||||
@ -112,7 +115,6 @@ function expandHome(shortenedPath) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
home = home.replace("$", "$$$$");
|
home = home.replace("$", "$$$$");
|
||||||
|
|
||||||
return path.resolve(shortenedPath.replace(/^~($|\/|\\)/, home + "$1"));
|
return path.resolve(shortenedPath.replace(/^~($|\/|\\)/, home + "$1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user