rename the cookie file (if we need to) so that if you run -installer,
you cookies will be migrated.
Change DoTheCopy() to be DoTheCopyAndRename(), which takes additional parameters
to rename files as it copies them.
remove unnecessary code.
#define constants to be clean.
add a stub for RenameAndMoveFilterFiles() with comments on what we need to do
for the mac.
follow convention:
rename nsPrefMigrationIIDs.h to nsPrefMigrationCIDs.h
rename NS_IPrefMigration_IID -> NS_PREFMIGRATION_CID
rename kFoo_CID to kFooCID
use the NS_GET_IID macro
also, instead of just checking that ".msf" or ".snm" or ".summary" appears in th
e file name, we now check if the filename *ends* with ".msf", ".snm" or ".summar
y".
on UNIX, "mail.directory" is always set.
on windows, it may be set to ""
add the PL_strlen test to tree "" as not being set, so we assume the default 4.x location, which is what we want.
and make the code more portable.
create directories with 00700 permissions, not PR_RDWR. On UNIX, PR_RDWR would
create directories with d______r__. 00700 gives us drwx______ which is want we
want. change the signature of ProcessPrefs() so that we just return the result,instead of
setting an out parameter. remove ComputeMailPath(), it is unused.
instead of doing PR_MALLOC in the beginning, set char *'s to nsnull, and use
PR_smprintf() and CopyCharPref() to allocate the memory. (the PR_FREEIF()s
are still correct, though.)
use NS_SUCCEEDED() and NS_FAILED() instead of comparing against NS_OK directly.
don't execute the GetSizes(), GetDriveName() and CheckForSpace() methods
on UNIX, as they are not UNIX friendly. hold onto the nsIFileSpec that points
to the prefs file, so we can save it when we are done using SavePrefFileAs()
Change the signature of GetDirFromPref() and GetDriveName(). The out parameters
were char *'s. they need to be char **'s for them to work.
Change GetDirFromPref() to also take the oldProfilePathStr and the new directory leaf name.
These are used on UNIX, where we to do some magic because in
4.x the directory structure on UNIX was much different that on Mac and Windows
fix leak in GetDriveName(). we were leaking *driveName in the loop.
initialize variables.
add some printfs to remind me that there is more todo.
fix various comments to reflect the new signatures to methods.
check parameters of GetDirFromPref() and GetDriveName()
define server_type constants.
handle it gracefully, if they didn't use imap or pop. (example, movemail on unix.)
the pref is "mail.server_type" and it's an int (not "mail.server.type" as a char *)
initialize some variables to nsnull.
use the NS_DEFINE_STATIC_IID_ACCESSOR and NS_DEFINE_STATIC_CID_ACCESSOR macros.
fix a bunch of warnings. rewrite to use #defines. remove unused variables. use MAXPATHLEN instead of _MAX_PATH.
when setting a 4.x pref (example "mail.directory") to a new 5.0 value, create a "premigration" pref
with the old value. (example "premigration.mail.directory").