From 28f85017084ddef0d72303b32c8bf42e9cbdc874 Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Wed, 27 Feb 2008 00:52:56 +0000 Subject: [PATCH] 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 --- mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp b/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp index 50e3d7767f0..353a1f13281 100644 --- a/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp +++ b/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp @@ -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); + } } }