Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/macdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Laval <jeremie.laval@gmail.com>2012-06-26 21:40:32 +0400
committerJérémie Laval <jeremie.laval@gmail.com>2012-06-26 21:40:32 +0400
commit876bbdaa03e2207b5e4f3cd31e07005028cc7358 (patch)
tree7c9e690909cb472945adf55550ca83f40e98108f /BookmarkManager.cs
parent0727e26e1904afc0cdeccfe8427e0d538953fe83 (diff)
[macdoc] Don't bark on file creation problems due to permissions
Diffstat (limited to 'BookmarkManager.cs')
-rw-r--r--BookmarkManager.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/BookmarkManager.cs b/BookmarkManager.cs
index 00f566e..68d1eab 100644
--- a/BookmarkManager.cs
+++ b/BookmarkManager.cs
@@ -96,8 +96,10 @@ namespace macdoc
if (!Directory.Exists (storagePath))
Directory.CreateDirectory (storagePath);
var path = Path.Combine (storagePath, "bookmarks.xml");
- using (var file = File.Create (path))
- serializer.Serialize (file, bookmarks);
+ try {
+ using (var file = File.Create (path))
+ serializer.Serialize (file, bookmarks);
+ } catch (UnauthorizedAccessException) {}
}
public void CommitBookmarkChange (Entry entry)