mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 14:44:13 +00:00
Remove os.homedir() polyfill
This commit is contained in:
parent
aef1bb3acc
commit
8343f3cdcf
1 changed files with 1 additions and 10 deletions
|
@ -116,17 +116,8 @@ function expandHome(shortenedPath) {
|
||||||
if (!shortenedPath) {
|
if (!shortenedPath) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
var home;
|
|
||||||
|
|
||||||
if (os.homedir) {
|
const home = os.homedir().replace("$", "$$$$");
|
||||||
home = os.homedir();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!home) {
|
|
||||||
home = process.env.HOME || "";
|
|
||||||
}
|
|
||||||
|
|
||||||
home = home.replace("$", "$$$$");
|
|
||||||
return path.resolve(shortenedPath.replace(/^~($|\/|\\)/, home + "$1"));
|
return path.resolve(shortenedPath.replace(/^~($|\/|\\)/, home + "$1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue