Comment on attachment 8371072 WIP patch 3 Review of attachment 8371072: -----------------------------------------------------------------
Nice test. ::: mailnews/local/src/nsLocalMailFolder.cpp @@ +1723,5 @@ > return NS_MSG_ERROR_COPY_FOLDER_ABORTED; > } > } > + > + nsAutoString newFolderName(EmptyString()); Shouldn't need the EmptyString() initializer; the constructor makes an empty string by default. @@ +1726,5 @@ > + > + nsAutoString newFolderName(EmptyString()); > + nsAutoString folderName; > + rv = srcFolder->GetName(folderName); > + NS_ENSURE_SUCCESS(rv, rv); Mozilla core code is deprecating NS_ENSURE_SUCCESS, because the macro hides control flow - see https://groups.google.com/d/topic/mozilla.dev.platform/1clMLuuhtWQ/discussion . Use if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } if the condition deserves a warning message (as this one does) ::: mailnews/local/test/unit/test_nsIMsgLocalMailFolder.js @@ +50,5 @@ > + do_check_eq(trash.numSubFolders, 3); > + // The folder should be automatically renamed as the same name already is > in Trash > + // but the subfolder should be untouched. > + let folderDeleted3 = trash.getChildNamed("folder(3)"); > + let subfolderDeleted = folderDeleted3.getChildNamed("subfolder"); do_check_true(trash.containsChildNamed("folder(3)"); do_check_true(trash.getChildNamed("folder(3)").containsChildNamed("subfolder")); -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to thunderbird in Ubuntu. https://bugs.launchpad.net/bugs/214366 Title: Can't delete a folder if Trash already contains a folder of the same name Status in Mozilla Thunderbird Mail and News: In Progress Status in “thunderbird” package in Ubuntu: Triaged Bug description: Binary package hint: mozilla-thunderbird 1. Create a new folder, eg. "Temp" 2. Delete it, OK 3. Create the same folder again 4. Delete it, OK I expect it to be moved to my Trash folder, perhaps with a suffix appended (it being the second instance of that folder in the trash). Thunderbird popped up an error message. On an imap host: The current command did not succeed. The mail server responded: Mailbox already exists. In the local folders: A folder with that name already exists. Please enter a different name (!) Workarounds: 1. Empty the trash 2. Rename the folder before deletion 3. Rename the folder already in the trash 4. Delete (permanently) the folder that is already in the trash Ubuntu 7.10 Gutsy thunderbird 2.0.0.12+nobinonly-0ubuntu0.7.10.0 To manage notifications about this bug go to: https://bugs.launchpad.net/thunderbird/+bug/214366/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp