mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-13 23:20:37 +00:00
Implement support for mono (#806)
* Initial buggy mono support * Start building generic-netf variant * Fix CIs * Disable ILLink.Tasks for generic-netf * Make generic-netf *special* * Keep fixing Don't ask me why reverse order works, this is next-gen msbuild magic * Mono compat * Mono compat * Misc * Update to .NET Framework 4.7.2 * .NET 4.7.2 compat * Misc
This commit is contained in:
committed by
GitHub
parent
56d48ae210
commit
a515de5807
@@ -198,7 +198,7 @@ namespace ArchiSteamFarm {
|
||||
BotDatabase botDatabase;
|
||||
|
||||
try {
|
||||
botDatabase = JsonConvert.DeserializeObject<BotDatabase>(await File.ReadAllTextAsync(filePath).ConfigureAwait(false));
|
||||
botDatabase = JsonConvert.DeserializeObject<BotDatabase>(await RuntimeCompatibility.File.ReadAllTextAsync(filePath).ConfigureAwait(false));
|
||||
} catch (Exception e) {
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
@@ -320,7 +320,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
// We always want to write entire content to temporary file first, in order to never load corrupted data, also when target file doesn't exist
|
||||
await File.WriteAllTextAsync(newFilePath, json).ConfigureAwait(false);
|
||||
await RuntimeCompatibility.File.WriteAllTextAsync(newFilePath, json).ConfigureAwait(false);
|
||||
|
||||
if (File.Exists(FilePath)) {
|
||||
File.Replace(newFilePath, FilePath, null);
|
||||
|
||||
Reference in New Issue
Block a user