mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Changing history to cache, removed redundant code
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user