From 983bc49601d7fcd53c2a57b6acad7efc0bd93cc6 Mon Sep 17 00:00:00 2001 From: Miepee Date: Tue, 27 Sep 2022 17:05:08 +0200 Subject: [PATCH] Make "Personal" on Android also point to a Documents folder #68610 moved `Personal`/`MyDocuments` on Unix systems from HOME to the documents folder. However, it didn't do so for Android systems, which was only noticed after tests later failed. This fixes it. --- .../System.Private.CoreLib/src/System/Environment.Android.cs | 4 +++- 1 file changed, 3 insertions(+), 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 44c8988532f367..53a46feff7251f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs @@ -54,7 +54,6 @@ private static string GetFolderPathCore(SpecialFolder folder, SpecialFolderOptio switch (folder) { - case SpecialFolder.Personal: case SpecialFolder.LocalApplicationData: return home; @@ -65,6 +64,9 @@ private static string GetFolderPathCore(SpecialFolder folder, SpecialFolderOptio case SpecialFolder.DesktopDirectory: return Path.Combine(home, "Desktop"); + case SpecialFolder.MyDocuments: // Same value as Personal + return Path.Combine(home, "Documents"); + case SpecialFolder.MyMusic: return Path.Combine(home, "Music");