Bug 459693 - Eliminate nsFileSpec and nsIFileSpec (references) from MailNews; (Ev1) Bug 33451 <nsImapMailFolder.cpp> followup; r+sr=bienvenu
authorSerge Gautherie <sgautherie.bz@free.fr>
Thu, 23 Oct 2008 03:52:11 +0200
changeset 695 13727f26b4a983aa0d4242f3ec1ee8012a09d9df
parent 694 b52bc0e1b57a83f47edca686be91c05d262b80a4
child 696 9c1554e52ae868eb16e13b16f6582d34aa56897b
push idunknown
push userunknown
push dateunknown
bugs459693, 33451
Bug 459693 - Eliminate nsFileSpec and nsIFileSpec (references) from MailNews; (Ev1) Bug 33451 <nsImapMailFolder.cpp> followup; r+sr=bienvenu
mailnews/imap/src/nsImapMailFolder.cpp
--- 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