Various bugfixes

This commit is contained in:
JustArchi
2017-07-10 17:07:48 +02:00
parent 32b2ea9fb7
commit f4187e194e
6 changed files with 119 additions and 85 deletions

View File

@@ -156,7 +156,12 @@ namespace ArchiSteamFarm {
try {
File.WriteAllText(newFilePath, json);
File.Replace(newFilePath, FilePath, null);
if (File.Exists(FilePath)) {
File.Replace(newFilePath, FilePath, null);
} else {
File.Move(newFilePath, FilePath);
}
} catch (Exception e) {
ASF.ArchiLogger.LogGenericException(e);
}