From 2cd01eb1aaebe630d39214d47fc6b5b67d8852d2 Mon Sep 17 00:00:00 2001 From: allo Date: Fri, 13 Jan 2006 15:26:10 +0000 Subject: [PATCH] bugfix for dates.db git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1329 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/data/bookmarksDB.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/data/bookmarksDB.java b/source/de/anomic/data/bookmarksDB.java index 179bcaeaa..d6527a839 100644 --- a/source/de/anomic/data/bookmarksDB.java +++ b/source/de/anomic/data/bookmarksDB.java @@ -203,7 +203,7 @@ public class bookmarksDB { 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; @@ -491,6 +491,10 @@ public class bookmarksDB { }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)