From 9b385adb7bc10bd49c72b1d405cb24d1efb9179f Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 4 Aug 2014 03:17:39 +0000 Subject: [PATCH] config saving - do a try/catch instead of my attempt at checking read-only --- BizHawk.Client.Common/config/ConfigService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.Common/config/ConfigService.cs b/BizHawk.Client.Common/config/ConfigService.cs index 425a1a2ef7..b58d155ffa 100644 --- a/BizHawk.Client.Common/config/ConfigService.cs +++ b/BizHawk.Client.Common/config/ConfigService.cs @@ -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