Fix for nsIFile delete conflicts with JS reserved name b=37406, r=dougt, sr=jst

Renamed all Delete methods to Remove.

--pete
This commit is contained in:
pete%alphanumerica.com 2001-07-24 18:38:25 +00:00
Родитель 850dc2325c
Коммит f65c767018
35 изменённых файлов: 69 добавлений и 69 удалений

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

@ -3038,7 +3038,7 @@ nsChromeRegistry::CheckForNewChrome()
}
}
PR_Close(file);
// listFile->Delete(PR_FALSE);
// listFile->Remove(PR_FALSE);
return rv;
}
@ -3223,7 +3223,7 @@ NS_IMETHODIMP nsChromeRegistry::Observe(nsISupports *aSubject, const PRUnichar *
nsCOMPtr<nsIFile> userChromeDir;
rv = NS_GetSpecialDirectory(NS_APP_USER_CHROME_DIR, getter_AddRefs(userChromeDir));
if (NS_SUCCEEDED(rv) && userChromeDir)
rv = userChromeDir->Delete(PR_TRUE);
rv = userChromeDir->Remove(PR_TRUE);
}
}
else if (!nsCRT::strcmp(NS_LITERAL_STRING("profile-do-change").get(), aTopic)) {

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

@ -455,7 +455,7 @@ NS_IMETHODIMP CWebBrowserContainer::OnStateChange(nsIWebProgress* aWebProgress,
fileToUse->Equals( tempFile, &equalToTempFile );
fileToUse->Exists(&filetoUseAlreadyExists);
if( filetoUseAlreadyExists && !equalToTempFile )
fileToUse->Delete(PR_FALSE);
fileToUse->Remove(PR_FALSE);
// extract the new leaf name from the file location
nsXPIDLCString fileName;

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

@ -132,7 +132,7 @@ COOKIE_DeletePersistentUserData(void)
if (NS_SUCCEEDED(res)) {
res = cookiesFile->Append(kCookiesFileName);
if (NS_SUCCEEDED(res))
(void) cookiesFile->Delete(PR_FALSE);
(void) cookiesFile->Remove(PR_FALSE);
}
}

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

@ -662,7 +662,7 @@ PERMISSION_DeletePersistentUserData(void)
if (NS_SUCCEEDED(res)) {
res = cookiesPermFile->Append(kCookiesPermFileName);
if (NS_SUCCEEDED(res))
(void) cookiesPermFile->Delete(PR_FALSE);
(void) cookiesPermFile->Remove(PR_FALSE);
}
}

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

@ -1960,7 +1960,7 @@ nsMessengerMigrator::migrateAddressBookPrefEnum(const char *aPref, void *aClosur
#ifdef DEBUG_AB_MIGRATION
printf("remove the tmp file\n");
#endif /* DEBUG_AB_MIGRATION */
rv = tmpLDIFFile->Delete(PR_TRUE);
rv = tmpLDIFFile->Remove(PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv),"failed to delete the temp ldif file");
if (NS_FAILED(rv)) return;

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

@ -157,7 +157,7 @@ nsresult nsMsgCompFields::CleanUpTempFiles()
}
// remove it if not a dir
urlFile->Delete(PR_FALSE);
urlFile->Remove(PR_FALSE);
}
token = nsCRT::strtok(rest, ",", &rest);

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

@ -180,7 +180,7 @@ PRBool ObtainSpoolLock(const char *spoolnameStr,
#endif
// step 3: remove .mozlock file, in any case
rv = tmplocfile->Delete(PR_FALSE /* non-recursive */);
rv = tmplocfile->Remove(PR_FALSE /* non-recursive */);
#ifdef MOVEMAIL_DEBUG
if (NS_FAILED(rv)) {
// Could not delete our .mozlock file... very unusual, but
@ -225,7 +225,7 @@ PRBool YieldSpoolLock(const char *spoolnameStr)
return PR_FALSE;
// Delete the file
rv = locklocfile->Delete(PR_FALSE /* non-recursive */);
rv = locklocfile->Remove(PR_FALSE /* non-recursive */);
if (NS_FAILED(rv))
return PR_FALSE;

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

@ -270,7 +270,7 @@ nsJAR::Extract(const char *zipEntry, nsIFile* outFile)
PR_Close(fd);
if (err != ZIP_OK)
outFile->Delete(PR_FALSE);
outFile->Remove(PR_FALSE);
else
{
#if defined(XP_UNIX)

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

@ -133,7 +133,7 @@ NS_IMETHODIMP nsPrefService::Observe(nsISupports *aSubject, const PRUnichar *aTo
if (!nsCRT::strcmp(aTopic, NS_LITERAL_STRING("profile-before-change").get())) {
if (!nsCRT::strcmp(someData, NS_LITERAL_STRING("shutdown-cleanse").get())) {
if (mCurrentFile) {
mCurrentFile->Delete(PR_FALSE);
mCurrentFile->Remove(PR_FALSE);
NS_RELEASE(mCurrentFile);
}
} else {

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

@ -1088,7 +1088,7 @@ nsPluginStreamInfo::~nsPluginStreamInfo()
PR_FALSE,
getter_AddRefs(localFile));
if(NS_SUCCEEDED(res))
localFile->Delete(PR_FALSE);
localFile->Remove(PR_FALSE);
}
if (mFilePath)
PL_strfree(mFilePath);
@ -1455,7 +1455,7 @@ nsPluginStreamListenerPeer::~nsPluginStreamListenerPeer()
nsCOMPtr<nsILocalFile> localFile;
nsresult res = NS_NewLocalFile(mLocalFile, PR_FALSE, getter_AddRefs(localFile));
if(NS_SUCCEEDED(res))
localFile->Delete(PR_FALSE);
localFile->Remove(PR_FALSE);
delete [] mLocalFile;
}
delete mDataForwardToRequest;
@ -2806,7 +2806,7 @@ NS_IMETHODIMP nsPluginHostImpl::Destroy(void)
rv = pluginTmp->Append(kPluginTmpDirName);
if (NS_FAILED(rv)) return rv;
pluginTmp->Delete(PR_TRUE);
pluginTmp->Remove(PR_TRUE);
return NS_OK;
}

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

@ -1088,7 +1088,7 @@ nsPluginStreamInfo::~nsPluginStreamInfo()
PR_FALSE,
getter_AddRefs(localFile));
if(NS_SUCCEEDED(res))
localFile->Delete(PR_FALSE);
localFile->Remove(PR_FALSE);
}
if (mFilePath)
PL_strfree(mFilePath);
@ -1455,7 +1455,7 @@ nsPluginStreamListenerPeer::~nsPluginStreamListenerPeer()
nsCOMPtr<nsILocalFile> localFile;
nsresult res = NS_NewLocalFile(mLocalFile, PR_FALSE, getter_AddRefs(localFile));
if(NS_SUCCEEDED(res))
localFile->Delete(PR_FALSE);
localFile->Remove(PR_FALSE);
delete [] mLocalFile;
}
delete mDataForwardToRequest;
@ -2806,7 +2806,7 @@ NS_IMETHODIMP nsPluginHostImpl::Destroy(void)
rv = pluginTmp->Append(kPluginTmpDirName);
if (NS_FAILED(rv)) return rv;
pluginTmp->Delete(PR_TRUE);
pluginTmp->Remove(PR_TRUE);
return NS_OK;
}

6
netwerk/cache/filecache/nsNetDiskCache.cpp поставляемый
Просмотреть файл

@ -170,7 +170,7 @@ nsNetDiskCache::~nsNetDiskCache()
if( trash.CompareWithConversion( filename, PR_FALSE, 5 ) == 0)
file->Delete( PR_TRUE );
file->Remove( PR_TRUE );
nsCRT::free(filename) ;
}
@ -642,12 +642,12 @@ nsNetDiskCache::RemoveAll(void)
return rv ;
PRBool isDirectory;
if ( NS_SUCCEEDED(file->IsDirectory( &isDirectory )) && isDirectory )
file->Delete( PR_TRUE );
file->Remove( PR_TRUE );
}
if ( mDBFile )
{
mDBFile->Delete(PR_FALSE) ;
mDBFile->Remove(PR_FALSE) ;
if (mDBFile)
{
PRBool exists = PR_FALSE;

8
netwerk/cache/src/nsDiskCacheDevice.cpp поставляемый
Просмотреть файл

@ -287,7 +287,7 @@ nsDiskCacheDevice::Init()
nsCOMPtr<nsIFile> cacheTrashDir;
rv = GetCacheTrashDirectory(getter_AddRefs(cacheTrashDir));
if (NS_FAILED(rv)) goto error_exit;
(void) cacheTrashDir->Delete(PR_TRUE); // ignore errors, we tried...
(void) cacheTrashDir->Remove(PR_TRUE); // ignore errors, we tried...
// Try opening cache map file.
mCacheMap = new nsDiskCacheMap;
@ -730,7 +730,7 @@ nsDiskCacheDevice::InitializeCacheDirectory()
nsresult rv;
// recursively delete the disk cache directory.
rv = mCacheDirectory->Delete(PR_TRUE);
rv = mCacheDirectory->Remove(PR_TRUE);
if (NS_FAILED(rv)) {
// try moving it aside
@ -850,7 +850,7 @@ nsDiskCacheDevice::SetCacheParentDirectory(nsILocalFile * parentDir)
rv = directory->Exists(&exists);
if (NS_SUCCEEDED(rv) && exists)
(void) directory->Delete(PR_TRUE);
(void) directory->Remove(PR_TRUE);
// clean up obsolete NewCache directory
rv = parentDir->Clone(getter_AddRefs(directory));
@ -860,7 +860,7 @@ nsDiskCacheDevice::SetCacheParentDirectory(nsILocalFile * parentDir)
rv = directory->Exists(&exists);
if (NS_SUCCEEDED(rv) && exists)
(void) directory->Delete(PR_TRUE);
(void) directory->Remove(PR_TRUE);
}

2
netwerk/cache/src/nsDiskCacheMap.cpp поставляемый
Просмотреть файл

@ -759,7 +759,7 @@ nsDiskCacheMap::DeleteStorage(nsDiskCacheRecord * record, PRBool metaData)
rv = GetFileForDiskCacheRecord(record, metaData, getter_AddRefs(file));
if (NS_SUCCEEDED(rv)) {
rv = file->Delete(PR_FALSE); // false == non-recursive
rv = file->Remove(PR_FALSE); // false == non-recursive
}
DecrementTotalSize(sizeK * 1024);

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

@ -385,7 +385,7 @@ Test(CreateFun create, PRUint32 count,
if (NS_FAILED(rv)) goto done;
if (exists) {
rv = outSpec->Delete(PR_FALSE);
rv = outSpec->Remove(PR_FALSE);
if (NS_FAILED(rv)) goto done;
}

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

@ -1128,11 +1128,11 @@ nsPrefMigration::ProcessPrefsCallback(const char* oldProfilePathStr, const char
PRBool flagExists = PR_FALSE;
m_prefsFile->Exists(&flagExists); //Delete the prefs.js file in the temp directory.
if (flagExists)
m_prefsFile->Delete(PR_FALSE);
m_prefsFile->Remove(PR_FALSE);
systemTempIFileDir->Exists(&flagExists); //Delete the unique dir in the system temp dir.
if (flagExists)
systemTempIFileDir->Delete(PR_FALSE);
systemTempIFileDir->Remove(PR_FALSE);
return rv;
}

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

@ -1667,7 +1667,7 @@ NS_IMETHODIMP nsProfile::DeleteProfile(const PRUnichar* profileName, PRBool canD
if (NS_SUCCEEDED(rv))
dirToDelete = parentDir;
}
rv = dirToDelete->Delete(PR_TRUE);
rv = dirToDelete->Remove(PR_TRUE);
}
}

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

@ -1358,7 +1358,7 @@ nsresult ProfileStruct::InternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe
{
SetResolvedProfileDir(tempLocal);
if (leafCreated)
tempLocal->Delete(PR_FALSE);
tempLocal->Remove(PR_FALSE);
}
}
@ -1383,7 +1383,7 @@ nsresult ProfileStruct::ExternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe
rv = resolvedLocation->GetPersistentDescriptor(getter_Copies(descBuf));
if (NS_FAILED(rv)) return rv;
if (leafCreated)
resolvedLocation->Delete(PR_FALSE);
resolvedLocation->Remove(PR_FALSE);
regData = NS_ConvertUTF8toUCS2(descBuf);
#else
nsXPIDLString ucPath;

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

@ -3038,7 +3038,7 @@ nsChromeRegistry::CheckForNewChrome()
}
}
PR_Close(file);
// listFile->Delete(PR_FALSE);
// listFile->Remove(PR_FALSE);
return rv;
}
@ -3223,7 +3223,7 @@ NS_IMETHODIMP nsChromeRegistry::Observe(nsISupports *aSubject, const PRUnichar *
nsCOMPtr<nsIFile> userChromeDir;
rv = NS_GetSpecialDirectory(NS_APP_USER_CHROME_DIR, getter_AddRefs(userChromeDir));
if (NS_SUCCEEDED(rv) && userChromeDir)
rv = userChromeDir->Delete(PR_TRUE);
rv = userChromeDir->Remove(PR_TRUE);
}
}
else if (!nsCRT::strcmp(NS_LITERAL_STRING("profile-do-change").get(), aTopic)) {

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

@ -488,7 +488,7 @@ LocalStoreImpl::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const PR
nsCOMPtr<nsIFile> aFile;
rv = NS_GetSpecialDirectory(NS_APP_LOCALSTORE_50_FILE, getter_AddRefs(aFile));
if (NS_SUCCEEDED(rv))
rv = aFile->Delete(PR_FALSE);
rv = aFile->Remove(PR_FALSE);
}
}
else if (!nsCRT::strcmp(aTopic, NS_LITERAL_STRING("profile-do-change").get())) {

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

@ -563,7 +563,7 @@ nsresult nsExternalHelperAppService::ExpungeTemporaryFiles()
{
localFile = do_QueryInterface(element);
if (localFile)
localFile->Delete(PR_FALSE);
localFile->Remove(PR_FALSE);
}
}
@ -1107,7 +1107,7 @@ nsresult nsExternalAppHandler::MoveFile(nsIFile * aNewFileLocation)
fileToUse->Equals(mTempFile, &equalToTempFile);
fileToUse->Exists(&filetoUseAlreadyExists);
if (filetoUseAlreadyExists && !equalToTempFile)
fileToUse->Delete(PR_FALSE);
fileToUse->Remove(PR_FALSE);
// extract the new leaf name from the file location
nsXPIDLCString fileName;
@ -1243,7 +1243,7 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel()
// clean up after ourselves and delete the temp file...
if (mTempFile)
{
mTempFile->Delete(PR_TRUE);
mTempFile->Remove(PR_TRUE);
mTempFile = nsnull;
}

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

@ -172,7 +172,7 @@ interface nsIFile : nsISupports
*
* This will not resolve any symlinks.
*/
void delete(in boolean recursive);
void remove(in boolean recursive);
/**
* Attributes of nsIFile.

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

@ -1504,7 +1504,7 @@ nsresult nsLocalFile::MoveCopy( nsIFile* newParentDir, const char* newName, PRBo
rv = CopyTo( newParentDir, newName );
if ( NS_FAILED ( rv ) )
return rv;
return Delete( PR_TRUE );
return Remove( PR_TRUE );
}
}
return MacErrorMapper( macErr );
@ -1588,7 +1588,7 @@ nsLocalFile::Load(PRLibrary * *_retval)
}
NS_IMETHODIMP
nsLocalFile::Delete(PRBool recursive)
nsLocalFile::Remove(PRBool recursive)
{
MakeDirty();

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

@ -1265,7 +1265,7 @@ nsLocalFile::Load(PRLibrary * *_retval)
}
NS_IMETHODIMP
nsLocalFile::Delete(PRBool recursive)
nsLocalFile::Remove(PRBool recursive)
{
PRBool isDir;
@ -1296,7 +1296,7 @@ nsLocalFile::Delete(PRBool recursive)
iterator->GetNext(getter_AddRefs(item));
file = do_QueryInterface(item);
file->Delete(recursive);
file->Remove(recursive);
iterator->HasMoreElements(&more);
}

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

@ -753,7 +753,7 @@ nsLocalFile::MoveTo(nsIFile *newParent, const char *newName)
#endif
rv = CopyTo(newParent, newName);
if (NS_SUCCEEDED(rv))
rv = Delete(PR_TRUE);
rv = Remove(PR_TRUE);
} else {
rv = NSRESULT_FOR_ERRNO();
}
@ -762,7 +762,7 @@ nsLocalFile::MoveTo(nsIFile *newParent, const char *newName)
}
NS_IMETHODIMP
nsLocalFile::Delete(PRBool recursive)
nsLocalFile::Remove(PRBool recursive)
{
CHECK_mPath();
@ -795,7 +795,7 @@ nsLocalFile::Delete(PRBool recursive)
nsCOMPtr<nsIFile> file = do_QueryInterface(item, &rv);
if (NS_FAILED(rv))
return NS_ERROR_FAILURE;
if (NS_FAILED(rv = file->Delete(recursive)))
if (NS_FAILED(rv = file->Remove(recursive)))
return rv;
}
}

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

@ -1159,7 +1159,7 @@ nsLocalFile::Load(PRLibrary * *_retval)
}
NS_IMETHODIMP
nsLocalFile::Delete(PRBool recursive)
nsLocalFile::Remove(PRBool recursive)
{
PRBool isDir;
@ -1190,7 +1190,7 @@ nsLocalFile::Delete(PRBool recursive)
iterator->GetNext(getter_AddRefs(item));
file = do_QueryInterface(item);
file->Delete(recursive);
file->Remove(recursive);
iterator->HasMoreElements(&more);
}

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

@ -186,7 +186,7 @@ out:
if(NS_FAILED(mainFile->Exists(&exists)))
return PR_FALSE;
if(exists && NS_FAILED(mainFile->Delete(PR_FALSE)))
if(exists && NS_FAILED(mainFile->Remove(PR_FALSE)))
return PR_FALSE;
// XXX Would prefer MoveTo with a 'null' newdir, the but nsILocalFile

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

@ -301,7 +301,7 @@ DeletionTest(char* creationPath, char* appendPath, PRBool recursive)
else
printf("no.\n");
rv = file->Delete(recursive);
rv = file->Remove(recursive);
VerifyResult(rv);
rv = file->Exists(&exists);

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

@ -2151,7 +2151,7 @@ nsGlobalHistory::OpenDB()
// we couldn't open the file, so it's either corrupt or doesn't exist.
// attempt to delete the file, but ignore the error
historyFile->Delete(PR_FALSE);
historyFile->Remove(PR_FALSE);
rv = OpenNewFile(factory, filePath);
}
@ -3163,7 +3163,7 @@ nsGlobalHistory::Observe(nsISupports *aSubject, const PRUnichar *aTopic,
nsCOMPtr <nsIFile> historyFile;
rv = NS_GetSpecialDirectory(NS_APP_HISTORY_50_FILE, getter_AddRefs(historyFile));
if (NS_SUCCEEDED(rv))
rv = historyFile->Delete(PR_FALSE);
rv = historyFile->Remove(PR_FALSE);
}
}
else if (aTopicString.Equals(NS_LITERAL_STRING("profile-do-change")))

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

@ -2318,7 +2318,7 @@ InternetSearchDataSource::saveContents(nsIChannel* channel, nsIInternetSearchCon
// save data to file
// Note: write out one character at a time, as we might be dealing
// with binary data (such as 0x00) [especially for images]
outFile->Delete(PR_FALSE);
outFile->Remove(PR_FALSE);
// Make an nsFileSpec from file so we can use nsOutputFileStream
nsXPIDLCString pathBuf;
@ -5745,7 +5745,7 @@ InternetSearchDataSource::Observe(nsISupports *aSubject, const PRUnichar *aTopic
nsCOMPtr<nsIFile> searchFile;
rv = NS_GetSpecialDirectory(NS_APP_SEARCH_50_FILE, getter_AddRefs(searchFile));
if (NS_SUCCEEDED(rv))
rv = searchFile->Delete(PR_FALSE);
rv = searchFile->Remove(PR_FALSE);
}
}
else if (!nsCRT::strcmp(aTopic, NS_LITERAL_STRING("profile-do-change").get()))

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

@ -171,7 +171,7 @@ PRInt32 DeleteFileNowOrSchedule(nsIFile* filename)
PRBool flagExists;
PRInt32 result = nsInstall::SUCCESS;
filename->Delete(PR_FALSE);
filename->Remove(PR_FALSE);
filename->Exists(&flagExists);
if (flagExists)
result = ScheduleFileForDeletion(filename);
@ -472,7 +472,7 @@ void DeleteScheduledFiles( HREG reg )
if (NS_SUCCEEDED(rv))
{
PRBool flagExists;
doomedFile->Delete(PR_FALSE);
doomedFile->Remove(PR_FALSE);
doomedFile->Exists(&flagExists);
if ( !flagExists )
{

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

@ -237,7 +237,7 @@ void nsInstallFile::RemoveAllFolders()
mFinalFile->GetParent(nsfsFolder);
for(i = 0; i < mFolderCreateCount; i++)
{
nsfsFolder.Delete(PR_FALSE);
nsfsFolder.Remove(PR_FALSE);
nsfsFolder.GetParent(nsfsParentFolder);
nsfsFolder = nsfsParentFolder;
}
@ -308,7 +308,7 @@ PRInt32 nsInstallFile::Complete()
void nsInstallFile::Abort()
{
if (mExtractedFile != nsnull)
mExtractedFile->Delete(PR_FALSE);
mExtractedFile->Remove(PR_FALSE);
}
#define RESBUFSIZE 4096

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

@ -588,7 +588,7 @@ PRInt32
nsInstallFileOpItem::NativeFileOpDirCreateAbort()
{
if(nsInstallFileOpItem::ACTION_SUCCESS == mAction)
mTarget->Delete(PR_FALSE);
mTarget->Remove(PR_FALSE);
return nsInstall::SUCCESS;
}
@ -615,7 +615,7 @@ nsInstallFileOpItem::NativeFileOpDirRemovePrepare()
PRInt32
nsInstallFileOpItem::NativeFileOpDirRemoveComplete()
{
mTarget->Delete(mFlags);
mTarget->Remove(mFlags);
return nsInstall::SUCCESS;
}
@ -826,7 +826,7 @@ nsInstallFileOpItem::NativeFileOpFileCopyComplete()
mTarget->IsFile(&flagIsFile); //Target is file that is already on the system
if (flagIsFile)
{
rv = mTarget->Delete(PR_FALSE);
rv = mTarget->Remove(PR_FALSE);
if (NS_FAILED(rv)) return rv;
rv = mTarget->GetParent(getter_AddRefs(parent));
if (NS_FAILED(rv)) return rv;
@ -844,7 +844,7 @@ nsInstallFileOpItem::NativeFileOpFileCopyComplete()
if (NS_FAILED(rv)) return rv;
tempTarget->Exists(&flagExists);
if (flagExists)
tempTarget->Delete(PR_FALSE);
tempTarget->Remove(PR_FALSE);
rv = mSrc->CopyTo(mTarget, leafName);
}
@ -876,7 +876,7 @@ nsInstallFileOpItem::NativeFileOpFileCopyAbort()
char* leafName;
mSrc->GetLeafName(&leafName);
fullTarget->Append(leafName);
fullTarget->Delete(PR_FALSE);
fullTarget->Remove(PR_FALSE);
}
return ret;
@ -1236,7 +1236,7 @@ nsInstallFileOpItem::NativeFileOpWindowsShortcutPrepare()
if(!flagExists)
ret = nsInstall::ACCESS_DENIED;
else
tempVar->Delete(0);
tempVar->Remove(0);
}
}

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

@ -245,7 +245,7 @@ PRInt32 nsInstallPatch::Prepare()
mPatchFile->Exists(&flagExists);
if ( (mPatchFile != nsnull) && (flagExists) )
{
mPatchFile->Delete(PR_FALSE);
mPatchFile->Remove(PR_FALSE);
}
@ -255,7 +255,7 @@ PRInt32 nsInstallPatch::Prepare()
mPatchFile->Exists(&flagExists);
if ((mPatchedFile != nsnull) && (flagExists))
{
mPatchedFile->Delete(PR_FALSE);
mPatchedFile->Remove(PR_FALSE);
}
return err;
}
@ -610,7 +610,7 @@ nsInstallPatch::NativePatch(nsIFile *sourceFile, nsIFile *patchFile, nsIFile **n
outFileSpec->GetParent(getter_AddRefs(parent));
outFileSpec->Delete(PR_FALSE);
outFileSpec->Remove(PR_FALSE);
char* leaf;
anotherName->GetLeafName(&leaf);
@ -660,7 +660,7 @@ cleanup:
{
tempSrcFile->Exists(&flagExists);
if (flagExists)
tempSrcFile->Delete(PR_FALSE);
tempSrcFile->Remove(PR_FALSE);
}
/* lets map any GDIFF error to nice SU errors */

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

@ -543,7 +543,7 @@ void nsXPInstallManager::Shutdown()
{
item = NS_STATIC_CAST(nsXPITriggerItem*, mTriggers->Get(i));
if ( item && item->mFile && !item->IsFileURL() )
item->mFile->Delete(PR_FALSE);
item->mFile->Remove(PR_FALSE);
}
}
@ -754,7 +754,7 @@ nsXPInstallManager::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
nsresult rv2 ;
rv2 = mItem->mFile->Exists(&flagExists);
if (NS_SUCCEEDED(rv2) && flagExists)
mItem->mFile->Delete(PR_FALSE);
mItem->mFile->Remove(PR_FALSE);
mItem->mFile = 0;
}