91438, filing a bookmark folder into itself causes the folder to get deleted.

r=vishy, sr=blake.
This commit is contained in:
ben%netscape.com 2001-07-19 09:01:41 +00:00
Родитель e6bb61a069
Коммит b1b521534d
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -324,6 +324,10 @@ BookmarksUIElement.prototype = {
openDialog("chrome://communicator/content/bookmarks/addBookmark.xul", "",
"centerscreen,chrome,modal=yes,dialog=yes,resizable=yes", null, null, folder, null, "selectFolder", rv);
if (rv.selectedFolder) {
for (var k = 0; k < selection.length; ++k) {
if (NODE_ID(selection[k]) == rv.selectedFolder)
return; // Selection contains the target folder. Just fail silently.
}
var additiveFlag = false;
var selectedItems = [].concat(this.getSelection())
for (var i = 0; i < selectedItems.length; ++i) {