Bug 301188 - "Import Eudora mail fails to find attachments in other directories" (Fix small bugs in the filespec modifications made to original patch, which caused code not to work as originally intended) [p=gwenger@qualcomm.com (Geoffrey C. Wenger) r=bienvenu sr=mscott]

git-svn-id: svn://10.0.0.236/trunk@246585 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com
2008-02-27 00:52:56 +00:00
parent 60fa212bd4
commit 28f8501708

View File

@@ -906,7 +906,7 @@ nsresult nsEudoraWin32::GetAttachmentInfo( const char *pFileName, nsIFile *pFile
PRBool exists = PR_FALSE;
if (NS_FAILED( rv = pFile->Exists( &exists)))
return( rv);
if (NS_FAILED( rv = pFile->IsFile( &isFile)))
if ( exists && NS_FAILED( rv = pFile->IsFile(&isFile) ) )
return( rv);
if (!exists || !isFile) {
@@ -943,12 +943,16 @@ nsresult nsEudoraWin32::GetAttachmentInfo( const char *pFileName, nsIFile *pFile
// We came up with a different path - check the new path.
if (NS_FAILED( rv = altFile->Exists( &exists)))
return( rv);
if (NS_FAILED( rv = altFile->IsFile( &isFile)))
if ( exists && NS_FAILED( rv = altFile->IsFile( &isFile) ) )
return( rv);
// Keep the new path if it helped us.
if (exists && isFile)
pFile = altFile;
{
nsCString nativePath;
altFile->GetNativePath(nativePath);
pLocalFile->InitWithNativePath(nativePath);
}
}
}