Author: toad
Date: 2006-09-02 16:15:06 +0000 (Sat, 02 Sep 2006)
New Revision: 10358
Modified:
trunk/freenet/src/freenet/clients/http/BookmarkManager.java
Log:
Fix a premature config write attempt.
Modified: trunk/freenet/src/freenet/clients/http/BookmarkManager.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/BookmarkManager.java 2006-09-02
16:12:40 UTC (rev 10357)
+++ trunk/freenet/src/freenet/clients/http/BookmarkManager.java 2006-09-02
16:15:06 UTC (rev 10358)
@@ -23,6 +23,7 @@
private Vector bookmarks;
private final NodeClientCore node;
private USKUpdatedCallback uskcb;
+ private boolean started;
public class BookmarkCallback implements StringArrCallback {
public String get() {
@@ -91,7 +92,9 @@
// just ignore that one
}
}
-
+ synchronized(this) {
+ started = true;
+ }
}
public BookmarkCallback makeCB() {
@@ -137,7 +140,7 @@
}
}
- if(store) node.storeConfig();
+ if(store && started) node.storeConfig();
}
public void removeBookmark(Bookmark b, boolean store) {
@@ -150,6 +153,6 @@
}
}
this.bookmarks.remove(b);
- if(store) node.storeConfig();
+ if(store && started) node.storeConfig();
}
}