mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-05 00:20:08 +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:
@@ -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