mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
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:
1 parent
a293707d71
commit
140d452ba2
1 file changed
+2
-2
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user