This commit is contained in:
mcmullen%netscape.com 1999-06-15 05:17:58 +00:00
Родитель adac70ab87
Коммит 0fbaf895d9
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -27,7 +27,7 @@
#include "nsIComponentManager.h"
#include "nsIEnumerator.h"
#include "plstr.h"
#include "nsFileSpec.h"
#include "nsIFileSpec.h"
#include "nsString.h"
#include "nsIFileLocator.h"
#include "nsFileLocations.h"
@ -932,14 +932,16 @@ NS_IMETHODIMP nsProfile::CreateNewProfile(char* charData)
return NS_ERROR_FAILURE;
// Get current profile, make the new one a sibling...
rv = locator->GetFileLocation(nsSpecialFileSpec::App_UserProfileDirectory50, &dirSpec);
nsIFileSpec* horribleCOMDirSpecThing;
rv = locator->GetFileLocation(nsSpecialFileSpec::App_UserProfileDirectory50, &horribleCOMDirSpecThing);
nsServiceManager::ReleaseService(kFileLocatorCID, locator);
if (NS_FAILED(rv))
if (NS_FAILED(rv) || !horribleCOMDirSpecThing)
return NS_ERROR_FAILURE;
//Append profile name to form a directory name
horribleCOMDirSpecThing->GetFileSpec(&dirSpec);
dirSpec.SetLeafName(profileName);
}