Fix PSReadLine history path on Windows

Bug introduced in initial port of PSReadLine. `Path.Combine` sees the
initial backslash as an absolute path, thus discarding `AppData`.
This commit is contained in:
Andrew Schwartzmeyer
2016-06-09 09:50:36 -07:00
parent a293707d71
commit 140d452ba2
@@ -172,8 +172,8 @@ namespace Microsoft.PowerShell
#if CORECLR
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // MS Windows
{
HistorySavePath = System.IO.Path.Combine(Environment.ExpandEnvironmentVariables("%AppData%"),
@"\Microsoft\Windows\PowerShell\PSReadline\",
HistorySavePath = System.IO.Path.Combine(Environment.GetEnvironmentVariable("APPDATA"),
@"Microsoft\Windows\PowerShell\PSReadline\",
hostName + "_history.txt");
}