mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 22:20:52 +00:00
Use hexadecimal strings for OS-wide resources
base64 slash character can cause problems with filepaths, besides, it's best to use ASCII only there due to various OS limitations
This commit is contained in:
@@ -142,7 +142,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
GlobalConfig = globalConfig;
|
||||
|
||||
string webProxyText = !string.IsNullOrEmpty(globalConfig.WebProxyText) ? "-" + Convert.ToBase64String(Encoding.UTF8.GetBytes(globalConfig.WebProxyText)) : "";
|
||||
string webProxyText = !string.IsNullOrEmpty(globalConfig.WebProxyText) ? "-" + BitConverter.ToString(Encoding.UTF8.GetBytes(globalConfig.WebProxyText)).Replace("-", "") : "";
|
||||
|
||||
ConfirmationsSemaphore ??= OS.CreateCrossProcessSemaphore(nameof(ConfirmationsSemaphore) + webProxyText);
|
||||
GiftsSemaphore ??= OS.CreateCrossProcessSemaphore(nameof(GiftsSemaphore) + webProxyText);
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace ArchiSteamFarm {
|
||||
return false;
|
||||
}
|
||||
|
||||
string uniqueName = "Global\\" + GetOsResourceName(nameof(SingleInstance)) + "-" + Convert.ToBase64String(Encoding.UTF8.GetBytes(Directory.GetCurrentDirectory()));
|
||||
string uniqueName = "Global\\" + GetOsResourceName(nameof(SingleInstance)) + "-" + BitConverter.ToString(Encoding.UTF8.GetBytes(Directory.GetCurrentDirectory())).Replace("-", "");
|
||||
|
||||
Mutex singleInstance = new Mutex(true, uniqueName, out bool result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user