Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static IEnumerable<string> GetMacOSMicrosoftDistJdkPaths ()
var jdks = AppDomain.CurrentDomain.GetData ($"GetMacOSMicrosoftJdkPaths jdks override! {typeof (JdkInfo).AssemblyQualifiedName}")
?.ToString ();
if (jdks == null) {
var home = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
var home = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
jdks = Path.Combine (home, "Library", "Developer", "Xamarin", "jdk");
}
if (!Directory.Exists (jdks))
Expand Down
6 changes: 3 additions & 3 deletions src/Xamarin.Android.Tools.AndroidSdk/OS.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.IO;
Expand Down Expand Up @@ -69,15 +69,15 @@ static string GetProgramFilesX86 ()
internal static string GetXamarinAndroidCacheDir ()
{
if (IsMac) {
var home = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
var home = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
return Path.Combine (home, "Library", "Caches", "Xamarin.Android");
} else if (IsWindows) {
var localAppData = Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData);
return Path.Combine (localAppData, "Xamarin.Android", "Cache");
} else {
var home = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
var xdgCacheHome = Environment.GetEnvironmentVariable ("XDG_CACHE_HOME");
if (string.IsNullOrEmpty (xdgCacheHome)) {
var home = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
xdgCacheHome = Path.Combine (home, ".cache");
}
return Path.Combine (xdgCacheHome, "Xamarin.Android");
Expand Down
4 changes: 2 additions & 2 deletions src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkUnix.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down Expand Up @@ -111,7 +111,7 @@ protected override IEnumerable<string> GetAllAvailableAndroidSdks ()
}

// Check some hardcoded paths for good measure
var macSdkPath = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), "Library", "Android", "sdk");
var macSdkPath = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.UserProfile), "Library", "Android", "sdk");
yield return macSdkPath;
}

Expand Down