Fixed Bug #217: After changing parent folder to edited folder, the book disapears from the list

This commit is contained in:
Aleksander Machniak (Kolab Systems) 2011-07-22 14:06:18 +02:00
parent a834f1184f
commit 2981e5a3e6

View file

@ -191,7 +191,7 @@ rcube_webmail.prototype.book_update = function(data, old)
level = olddata.realname.split(this.env.delimiter).length - data.realname.split(this.env.delimiter).length;
// update (realname and ID of) subfolders
for (n in sources) {
if (n.indexOf(old) == 0) {
if (n != data.id && n.indexOf(old) == 0) {
// new ID
id = data.id + '-' + n.substr(old.length);
name = sources[n].name;