mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
[minor fix] Places - deleting folder of livemarks - nsLivemarkService.js - 0x80070057 (NS_ERROR_ILLEGAL_VALUE)
This commit is contained in:
parent
6b5f1cedc6
commit
fc9d873b31
2 changed files with 54 additions and 40 deletions
|
|
@ -53,6 +53,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "AsyncShutdown",
|
|||
"resource://gre/modules/AsyncShutdown.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesSyncUtils",
|
||||
"resource://gre/modules/PlacesSyncUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm");
|
||||
|
||||
// The minimum amount of transactions before starting a batch. Usually we do
|
||||
// do incremental updates, a batch will cause views to completely
|
||||
|
|
@ -3248,8 +3250,11 @@ PlacesRemoveItemTransaction.prototype = {
|
|||
let contents =
|
||||
PlacesUtils.getFolderContents(this.item.id, false, false).root;
|
||||
for (let i = 0; i < contents.childCount; ++i) {
|
||||
let txn = new PlacesRemoveItemTransaction(contents.getChild(i).itemId);
|
||||
transactions.push(txn);
|
||||
let childId = contents.getChild(i).itemId;
|
||||
if (!PlacesUIUtils._isLivemark(childId)) {
|
||||
let txn = new PlacesRemoveItemTransaction(childId);
|
||||
transactions.push(txn);
|
||||
}
|
||||
}
|
||||
contents.containerOpen = false;
|
||||
// Reverse transactions to preserve parent-child relationship.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue