tags 285728 + patch
thanks

Alexander Sack wrote:
> 
> I will ask them ... but the single best way would be if we can provide an
> initial patch. Further we have to be sure if the bug exists for the version
> available from mozilla.org too. Could you please try to figure out if the
> problem exists there too?

You don't need to verify that anymore. I just tried it with the latest alpha
from upstream and the problem still persists.

OK, I have a patch for this. Thanks for your assistance. I will send it upstream
in the hope that they will include it in the next release. Can you verify it
please, so I can upload it to sid ASAP? Just drop the dpatch file attached to
this mail in debian/patches and add the filename (with .dpatch) to the
debian/patches/00list file.


Cheers,
-- 
 GPG messages preferred.   |  .''`.  ** Debian GNU/Linux **
 Alexander Sack            | : :' :      The  universal
 [EMAIL PROTECTED]           | `. `'      Operating System
 http://www.asoftsite.org  |   `-    http://www.debian.org/
#!/bin/sh -e
## 90_mail_components_miration_src_nsSeamonkeyProfileMigrator_cpp.dpatch by 
Alexander Sack <[EMAIL PROTECTED]> : fixes debbug 285728
##

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as 
argument"
                exit 1;;
esac

exit 0

@DPATCH@
--- mozilla/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp.orig   
2005-06-12 15:32:06.541760762 +0000
+++ mozilla/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp        
2005-06-12 15:33:54.317400924 +0000
@@ -697,27 +697,30 @@
       mTargetProfile->Clone(getter_AddRefs(targetNewsRCFile));
       targetNewsRCFile->Append(NEWS_DIR_50_NAME); 
 
-      // turn the pref into a nsILocalFile
-      nsCOMPtr<nsILocalFile> srcNewsRCFile = 
do_CreateInstance(NS_LOCAL_FILE_CONTRACTID);
-      
srcNewsRCFile->SetPersistentDescriptor(nsDependentCString(pref->stringValue));
-
-      // now make the copy
-      PRBool exists; 
-      srcNewsRCFile->Exists(&exists);
-      if (exists)
-      {
-        nsAutoString leafName;
-        srcNewsRCFile->GetLeafName(leafName);
-        srcNewsRCFile->CopyTo(targetNewsRCFile,leafName); // will fail if 
we've already copied a newsrc file here
-        targetNewsRCFile->Append(leafName);
-
-        // now write out the new descriptor
-        nsCAutoString descriptorString;
-        nsCOMPtr<nsILocalFile> localFile = do_QueryInterface(targetNewsRCFile);
-        localFile->GetPersistentDescriptor(descriptorString);
-        nsCRT::free(pref->stringValue);
-        pref->stringValue = ToNewCString(descriptorString);
-      }      
+      // don't do it if newsrc.file is 0
+      if (pref->stringValue) 
+      {  
+       // turn the pref into a nsILocalFile
+       nsCOMPtr<nsILocalFile> srcNewsRCFile = 
do_CreateInstance(NS_LOCAL_FILE_CONTRACTID);
+       
srcNewsRCFile->SetPersistentDescriptor(nsDependentCString(pref->stringValue));
+       // now make the copy
+       PRBool exists; 
+       srcNewsRCFile->Exists(&exists);
+       if (exists)
+       {
+          nsAutoString leafName;
+          srcNewsRCFile->GetLeafName(leafName);
+          srcNewsRCFile->CopyTo(targetNewsRCFile,leafName); // will fail if 
we've already copied a newsrc file here
+          targetNewsRCFile->Append(leafName);
+
+          // now write out the new descriptor
+          nsCAutoString descriptorString;
+          nsCOMPtr<nsILocalFile> localFile = 
do_QueryInterface(targetNewsRCFile);
+          localFile->GetPersistentDescriptor(descriptorString);
+          nsCRT::free(pref->stringValue);
+          pref->stringValue = ToNewCString(descriptorString);
+        }      
+      }
     }
   }
 

Reply via email to