now, your bookmarks get migrated!
(unix finally wins a file name battle, but windows still wins the war.)
git-svn-id: svn://10.0.0.236/trunk@48202 18797224-902f-48f8-a5cc-f745e15eee43
rewrite code so I could use it to rename cookies files and bookmarks file
with the same method.
git-svn-id: svn://10.0.0.236/trunk@48201 18797224-902f-48f8-a5cc-f745e15eee43
also, for mac, like unix, don't automigrate if there is only one profile.
this make it hell to debug. once it works, we can make it automigrate if
we only have one profile if we want.
git-svn-id: svn://10.0.0.236/trunk@47858 18797224-902f-48f8-a5cc-f745e15eee43
on the mac. now, we through up and and tell the user, which is better than crashing. I'm still working on getting it to work on the Mac.
git-svn-id: svn://10.0.0.236/trunk@47857 18797224-902f-48f8-a5cc-f745e15eee43
eventually, the non-scriptable interface will go away, but I don't have time do that yet. slamm is using this in his sidebarOverlay.js
git-svn-id: svn://10.0.0.236/trunk@47828 18797224-902f-48f8-a5cc-f745e15eee43
if there is enough space before copying.
once we get -installer working on the mac, we'll turn this code back on.
git-svn-id: svn://10.0.0.236/trunk@47771 18797224-902f-48f8-a5cc-f745e15eee43
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.
git-svn-id: svn://10.0.0.236/trunk@47519 18797224-902f-48f8-a5cc-f745e15eee43
also, for mac, like unix, don't automigrate if there is only one profile.
this make it hell to debug. once it works, we can make it automigrate if
we only have one profile if we want.
git-svn-id: svn://10.0.0.236/trunk@47329 18797224-902f-48f8-a5cc-f745e15eee43
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".
git-svn-id: svn://10.0.0.236/trunk@47226 18797224-902f-48f8-a5cc-f745e15eee43
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.
git-svn-id: svn://10.0.0.236/trunk@47160 18797224-902f-48f8-a5cc-f745e15eee43
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()
git-svn-id: svn://10.0.0.236/trunk@47082 18797224-902f-48f8-a5cc-f745e15eee43