Bug 459693 - Eliminate nsFileSpec and nsIFileSpec (references) from MailNews; (Ev1)
Bug 33451 <nsImapMailFolder.cpp> followup; r+sr=bienvenu
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -276,19 +276,16 @@ nsresult nsImapMailFolder::AddDirectoryS
{
if (mURI.Equals(kImapRootURI))
{
// don't concat the full separator with .sbd
}
else
{
// see if there's a dir with the same name ending with .sbd
- // unfortunately we can't just say:
- // path += sep;
- // here because of the way nsFileSpec concatenates
nsAutoString leafName;
path->GetLeafName(leafName);
leafName.Append(NS_LITERAL_STRING(FOLDER_SUFFIX));
path->SetLeafName(leafName);
}
return NS_OK;
}
@@ -7530,17 +7527,17 @@ NS_IMETHODIMP nsImapMailFolder::RenameCl
nsCOMPtr <nsILocalFile> dbFile;
nsCAutoString proposedDBName;
LossyCopyUTF16toASCII(newLeafName, proposedDBName);
// warning, path will be changed
rv = CreateFileForDB(proposedDBName, pathFile, getter_AddRefs(dbFile));
NS_ENSURE_SUCCESS(rv,rv);
- // it's OK to use openMailDBFromFileSpec and not OpenFolderDB here, since we don't use the DB.
+ // Use openMailDBFromFile() and not OpenFolderDB() here, since we don't use the DB.
rv = msgDBService->OpenMailDBFromFile(dbFile, PR_TRUE, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(unusedDB));
if (NS_SUCCEEDED(rv) && unusedDB)
{
//need to set the folder name
nsCOMPtr <nsIDBFolderInfo> folderInfo;
rv = unusedDB->GetDBFolderInfo(getter_AddRefs(folderInfo));
//Now let's create the actual new folder