config saving - do a try/catch instead of my attempt at checking read-only

This commit is contained in:
adelikat 2014-08-04 03:17:39 +00:00
parent 04255670f7
commit 9b385adb7b
1 changed files with 5 additions and 1 deletions

View File

@ -59,7 +59,7 @@ namespace BizHawk.Client.Common
public static void Save(string filepath, object config)
{
var file = new FileInfo(filepath);
if (file.Exists && !file.IsReadOnly)
try
{
using (var writer = file.CreateText())
{
@ -67,6 +67,10 @@ namespace BizHawk.Client.Common
Serializer.Serialize(w, config);
}
}
catch
{
/* Eat it */
}
}
// movie 1.0 header stuff