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:
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)