From f46aa8d1957184cc15f6fd517fa7f4d239f20aec Mon Sep 17 00:00:00 2001 From: v-alexjo Date: Mon, 6 Jun 2016 00:36:15 -0700 Subject: [PATCH] configdefault missed in refactoring --- src/Microsoft.PowerShell.PSReadLine/Cmdlets.cs | 5 +++-- src/System.Management.Automation/CoreCLR/CorePsPlatform.cs | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.PowerShell.PSReadLine/Cmdlets.cs b/src/Microsoft.PowerShell.PSReadLine/Cmdlets.cs index 6688d9cebc..7a72cee73d 100644 --- a/src/Microsoft.PowerShell.PSReadLine/Cmdlets.cs +++ b/src/Microsoft.PowerShell.PSReadLine/Cmdlets.cs @@ -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"); } } diff --git a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs index 104ffdf7d4..c2e5396626 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs @@ -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");