Changing history to cache, removed redundant code

This commit is contained in:
v-alexjo authored and Andrew Schwartzmeyer committed 2016-06-09 09:50:36 -07:00
1 parent c2527199a6
commit caa4c3f163
4 files changed
+49 -41

No files matched your search

@@ -187,17 +187,18 @@ namespace Microsoft.PowerShell
@"\Microsoft\Windows\PowerShell";
}
else
{
//check if the user has set an XDG path in their environment variables
profileDir = Platform.SelectProductNameForDirectory(Platform.XDG_Type.PROFILE);
}
if (!Directory.Exists(profileDir)) //xdg value may have been set but not a valid directory
{
Console.WriteLine("The selected directory (" + profileDir +") for the profile does not exist. Using the default path.");
profileDir = Platform.SelectProductNameForDirectory(Platform.XDG_Type.DEFAULT);
}
else
{
//check if the user has set an XDG path in their environment variables
profileDir = Platform.SelectProductNameForDirectory(Platform.XDG_Type.CACHE);
if (!Directory.Exists(profileDir)) //xdg value may have been set but not a valid directory
{
Console.Error.WriteLine("The selected directory (" + profileDir +") for the profile does not exist. Using the default path.");
profileDir = Platform.SelectProductNameForDirectory(Platform.XDG_Type.DEFAULT);
}
}
ClrFacade.SetProfileOptimizationRoot(profileDir);
}