Skip to content

Commit

Permalink
bugfix for dates.db
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1329 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
allo committed Jan 13, 2006
1 parent d5aaaf5 commit 2cd01eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/de/anomic/data/bookmarksDB.java
Expand Up @@ -203,7 +203,7 @@ public bookmarksDate getDate(String date){
Map map;
try {
map=datesTable.get(date);
if(map==null) return null;
if(map==null) return new bookmarksDate(date);
return new bookmarksDate(date, map);
} catch (IOException e) {
return null;
Expand Down Expand Up @@ -491,6 +491,10 @@ public Bookmark(String url){
}else{
mem.put(BOOKMARK_TIMESTAMP, String.valueOf(System.currentTimeMillis()));
}
bookmarksDate bmDate=getDate((String) mem.get(BOOKMARK_TIMESTAMP));
bmDate.add(this.urlHash);
bmDate.setDatesTable();

removeBookmark(this.urlHash); //prevent empty tags
} catch (IOException e) {
//entry not yet present (normal case)
Expand Down

0 comments on commit 2cd01eb

Please sign in to comment.