tomboy r2139 - in trunk: . Tomboy/Synchronization
- From: sharm svn gnome org
- To: svn-commits-list gnome org
- Subject: tomboy r2139 - in trunk: . Tomboy/Synchronization
- Date: Mon, 15 Sep 2008 01:46:04 +0000 (UTC)
Author: sharm
Date: Mon Sep 15 01:46:04 2008
New Revision: 2139
URL: http://svn.gnome.org/viewvc/tomboy?rev=2139&view=rev
Log:
* Tomboy/Synchronization/FileSystemSyncServer.cs: Better exception
handling when validating lock file. Some whitespace corrections.
Modified:
trunk/ChangeLog
trunk/Tomboy/Synchronization/FileSystemSyncServer.cs
Modified: trunk/Tomboy/Synchronization/FileSystemSyncServer.cs
==============================================================================
--- trunk/Tomboy/Synchronization/FileSystemSyncServer.cs (original)
+++ trunk/Tomboy/Synchronization/FileSystemSyncServer.cs Mon Sep 15 01:46:04 2008
@@ -581,20 +581,21 @@
// TODO: Permissions errors
// Attempt to load the file and parse it as XML
- using (FileStream fs = new FileStream (xmlFilePath, FileMode.Open)) {
- XmlDocument doc = new XmlDocument ();
- try {
+ try {
+ using (FileStream fs = new FileStream (xmlFilePath, FileMode.Open)) {
+ XmlDocument doc = new XmlDocument ();
// TODO: Make this be a validating XML reader. Not sure if it's validating yet.
doc.Load (fs);
- } catch {
+ }
+ } catch (Exception e) {
+ Logger.Debug ("Exception while validating lock file: " + e.ToString ());
return false;
}
- }
- return true;
- }
+ return true;
+ }
- private void AdjustPermissions (string path)
+ private void AdjustPermissions (string path)
{
Mono.Unix.Native.Syscall.chmod (path, Mono.Unix.Native.FilePermissions.ACCESSPERMS);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]