configdefault missed in refactoring

This commit is contained in:
v-alexjo
2016-06-09 09:50:36 -07:00
committed by Andrew Schwartzmeyer
parent 42c0b9a5f7
commit f46aa8d195
2 changed files with 7 additions and 5 deletions
@@ -180,7 +180,7 @@ namespace Microsoft.PowerShell
else
{
//PSReadline does not have access to Utils.CorePSPlatform. Must set PSReadline path seperately
string historypath = System.Environment.GetEnvironmentVariable("XDG_CACHE_HOME");
string historypath = System.Environment.GetEnvironmentVariable("XDG_DATA_HOME");
if (!String.IsNullOrEmpty(historypath))
{
@@ -195,7 +195,8 @@ namespace Microsoft.PowerShell
Environment.GetEnvironmentVariable("HOME"),
".local",
"share",
"powershell",
"powershell",
"PSReadLine",
hostName + "_history.txt");
}
}
@@ -115,7 +115,7 @@ namespace System.Management.Automation
string xdgdatahome = System.Environment.GetEnvironmentVariable("XDG_DATA_HOME");
string xdgcachehome = System.Environment.GetEnvironmentVariable("XDG_CACHE_HOME");
string xdgConfigHomeDefault = Path.Combine ( System.Environment.GetEnvironmentVariable("HOME"), ".config", "powershell");
string xdgModuleDefault = Path.Combine ( System.Environment.GetEnvironmentVariable("HOME"), ".local", "share", "powershell", "modules");
string xdgModuleDefault = Path.Combine ( System.Environment.GetEnvironmentVariable("HOME"), ".local", "share", "powershell", "Modules");
string xdgCacheDefault = Path.Combine (System.Environment.GetEnvironmentVariable("HOME"), ".cache", "powershell");
switch (dirpath){
@@ -141,11 +141,11 @@ namespace System.Management.Automation
{
Directory.CreateDirectory(xdgModuleDefault);
}
return xdgConfigHomeDefault;
return xdgModuleDefault;
}
else
{
return Path.Combine(xdgdatahome, "powershell");
return Path.Combine(xdgdatahome, "powershell", "Modules");
}
case Platform.XDG_Type.CACHE:
@@ -160,6 +160,7 @@ namespace System.Management.Automation
return xdgCacheDefault;
}
else
{
return Path.Combine(xdgcachehome, "powershell");