limit history sync to the last 500 items; load snapshots from the right directory in the profile

This commit is contained in:
Dan Mills 2007-12-21 16:07:42 -08:00
parent b711a57bc5
commit c99138171c
2 changed files with 8 additions and 3 deletions

View File

@ -503,6 +503,8 @@ Engine.prototype = {
if (status.GUID != this._snapshot.GUID) {
this._log.info("Remote/local sync GUIDs do not match. " +
"Forcing initial sync.");
this._log.debug("Remote: " + status.GUID);
this._log.debug("Local: " + this._snapshot.GUID);
this._store.resetGUIDs();
this._snapshot.data = {};
this._snapshot.version = -1;

View File

@ -204,7 +204,8 @@ SnapshotStore.prototype = {
load: function SStore_load() {
let file = this._dirSvc.get("ProfD", Ci.nsIFile);
file.append("weave-snapshots");
file.append("weave");
file.append("snapshots");
file.append(this.filename);
if (!file.exists())
@ -605,8 +606,8 @@ HistoryStore.prototype = {
},
_removeCommand: function HistStore__removeCommand(command) {
this._log.info(" -> removing history entry: " + command.GUID);
this._browserHist.removePage(command.GUID);
this._log.info(" -> NOT removing history entry: " + command.GUID);
//this._browserHist.removePage(command.GUID);
},
_editCommand: function HistStore__editCommand(command) {
@ -619,6 +620,8 @@ HistoryStore.prototype = {
options = this._hsvc.getNewQueryOptions();
query.minVisits = 1;
options.maxResults = 500;
options.sortingMode = query.SORT_BY_LASTMODIFIED_DESCENDING;
options.queryType = options.QUERY_TYPE_HISTORY;
let root = this._hsvc.executeQuery(query, options).root;