tomboy r2342 - in trunk: . Tomboy/Synchronization
- From: sharm svn gnome org
- To: svn-commits-list gnome org
- Subject: tomboy r2342 - in trunk: . Tomboy/Synchronization
- Date: Mon, 16 Feb 2009 18:06:07 +0000 (UTC)
Author: sharm
Date: Mon Feb 16 18:06:07 2009
New Revision: 2342
URL: http://svn.gnome.org/viewvc/tomboy?rev=2342&view=rev
Log:
* Tomboy/Synchronization/FuseSyncServiceAddin.cs: Raise errors if
file create/read/write tests fail when configuring sync. Fixes bug
#570917.
Modified:
trunk/ChangeLog
trunk/Tomboy/Synchronization/FuseSyncServiceAddin.cs
Modified: trunk/Tomboy/Synchronization/FuseSyncServiceAddin.cs
==============================================================================
--- trunk/Tomboy/Synchronization/FuseSyncServiceAddin.cs (original)
+++ trunk/Tomboy/Synchronization/FuseSyncServiceAddin.cs Mon Feb 16 18:06:07 2009
@@ -104,7 +104,6 @@
if (mounted) {
try {
// Test creating/writing/deleting a file
- // FIXME: Should throw TomboySyncException once string changes are OK again
string testPathBase = Path.Combine (mountPath, "test");
string testPath = testPathBase;
int count = 0;
@@ -115,8 +114,7 @@
// Test ability to create and write
string testLine = "Testing write capabilities.";
- using (FileStream fs = File.Create (testPath)) {
- StreamWriter writer = new StreamWriter (fs);
+ using (StreamWriter writer = new StreamWriter (File.Create (testPath))) {
writer.WriteLine (testLine);
}
@@ -128,10 +126,10 @@
break;
}
if (!testFileFound)
- ; // TODO: Throw TomboySyncException
+ throw new TomboySyncException (Catalog.GetString ("Could not read testfile."));
using (StreamReader reader = new StreamReader (testPath)) {
if (reader.ReadLine () != testLine)
- ; // TODO: Throw TomboySyncException
+ throw new TomboySyncException (Catalog.GetString ("Write test failed."));
}
// Test ability to delete
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]