fix same-parent requirement for command likeness

This commit is contained in:
Dan Mills 2007-10-16 16:49:46 -07:00
parent e37ed78cbd
commit 2c83f59126

View File

@ -445,10 +445,14 @@ BookmarksSyncService.prototype = {
if (!a || !b ||
a.action != b.action ||
a.data.type != b.data.type ||
a.parentGUID != b.parentGUID ||
a.data.parentGUID != b.data.parentGUID ||
a.GUID == b.GUID)
return false;
this._log.debug("deciding on likeness of " + a.GUID + " vs " + b.GUID);
this._log.debug("they have the same action, type, and parent");
this._log.debug("parent is " + a.data.parentGUID);
switch (a.data.type) {
case "bookmark":
if (a.data.URI == b.data.URI &&
@ -508,8 +512,8 @@ BookmarksSyncService.prototype = {
for (let i = 0; i < list.length; i++) {
if (!list[i])
continue;
if (list[i].parentGUID == oldGUID)
list[i].parentGUID = newGUID;
if (list[i].data.parentGUID == oldGUID)
list[i].data.parentGUID = newGUID;
for (let j = 0; j < list[i].parents.length; j++) {
if (list[i].parents[j] == oldGUID)
list[i].parents[j] = newGUID;