From e8854396719dd940021a1dd735ad28016668d031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Wed, 28 Sep 2022 13:24:27 +0200 Subject: [PATCH] Use existing variable for SpecialFolder.UserProfile While looking at https://github.com/dotnet/runtime/pull/76250 I noticed that we were querying the HOME env variable for SpecialFolder.UserProfile but we're already doing that in PersistedFiles.GetHomeDirectory() --- .../System.Private.CoreLib/src/System/Environment.Android.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs index 53a46feff7251f..8b9b01276c313e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs @@ -86,7 +86,7 @@ private static string GetFolderPathCore(SpecialFolder folder, SpecialFolderOptio return Path.Combine(home, ".fonts"); case SpecialFolder.UserProfile: - return GetEnvironmentVariable("HOME"); + return home; case SpecialFolder.CommonApplicationData: return "/usr/share";