[appcontent] Saving temp to user directory instead of appdata

This commit is contained in:
ParantezTech 2026-09-17 18:12:37 +03:00
parent dfb7efa5df
commit 5a79290f9b
2 changed files with 3 additions and 3 deletions

View File

@ -225,7 +225,7 @@ public static class AppContentExports
var invalidChars = Path.GetInvalidFileNameChars();
appName = new string(appName.Select(ch => invalidChars.Contains(ch) ? '_' : ch).ToArray());
var root = Path.Combine(Path.GetTempPath(), "SharpEmu", appName, "temp0");
var root = Path.Combine(AppContext.BaseDirectory, "user", "temp", appName, "temp0");
Environment.SetEnvironmentVariable(temp0VariableName, root);
return root;
}

View File

@ -5423,7 +5423,7 @@ public static partial class KernelMemoryCompatExports
var invalidChars = Path.GetInvalidFileNameChars();
appName = new string(appName.Select(ch => invalidChars.Contains(ch) ? '_' : ch).ToArray());
var root = Path.Combine(Path.GetTempPath(), "SharpEmu", appName, "temp0");
var root = Path.Combine(AppContext.BaseDirectory, "user", "temp", appName, "temp0");
Environment.SetEnvironmentVariable(temp0VariableName, root);
return root;
}
@ -5492,7 +5492,7 @@ public static partial class KernelMemoryCompatExports
var invalidChars = Path.GetInvalidFileNameChars();
appName = new string(appName.Select(ch => invalidChars.Contains(ch) ? '_' : ch).ToArray());
return Path.Combine(Path.GetTempPath(), "SharpEmu", appName);
return Path.Combine(AppContext.BaseDirectory, "user", "temp", appName);
}
private static void EnsureOpenParentDirectoryExists(string guestPath, string hostPath, int flags)