From 90c5aa8785b91d74a69ddeed494d18dd7cedc48a Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Sun, 1 Jan 2012 01:05:17 -0500 Subject: [PATCH] Bug 402392 - Suite Portion. r=bienvenu --- suite/mailnews/commandglue.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/suite/mailnews/commandglue.js b/suite/mailnews/commandglue.js index b414604433..34486644ff 100644 --- a/suite/mailnews/commandglue.js +++ b/suite/mailnews/commandglue.js @@ -933,9 +933,13 @@ function CreateVirtualFolder(newName, parentFolder, searchFolderURIs, searchTer // ### need to make sure view/folder doesn't exist. if (searchFolderURIs && (searchFolderURIs != "") && newName && (newName != "")) { + var newFolder; try { - var newFolder = parentFolder.addSubfolder(newName); + if (parentFolder instanceof(Components.interfaces.nsIMsgLocalMailFolder)) + newFolder = parentFolder.createLocalSubfolder(newName); + else + newFolder = parentFolder.addSubfolder(newName); newFolder.setFlag(Components.interfaces.nsMsgFolderFlags.Virtual); var vfdb = newFolder.msgDatabase; var searchTermString = getSearchTermString(searchTerms);