Closed Bug 11335 Opened 25 years ago Closed 25 years ago

[API] nsIMsgIncomingServer::SetLocalPath needs a default

Categories

(MailNews Core :: Backend, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: tonyr, Assigned: alecf)

References

Details

nsIMsgIncomingServer should automatically set local path based on the current profile, host name (and maybe user name?). In addition, Get/SetLocalPath should take an nsIFileSpec * rather than a char *. Another option if this is not desirable would be to add a method to nsIMsgIncomingServer to create a default local path. Currently, everyone creating a nsIMsgIncoming server has to duplicate the same code to get the profile directory, append Mail/{host name} and then call SetLocalPath.
Can we mark this M10?
Status: NEW → ASSIGNED
Target Milestone: M10
QA Contact: lchiang → ppandit
Priority: P3 → P2
this is probably something that each type of server needs to override for itself when the hostname gets set.
Summary: nsIMsgIncomingServer::SetLocalPath needs a default → [API] nsIMsgIncomingServer::SetLocalPath needs a default
We're going to have to implement this on a per-protocol basis: - Local Mail should default to the 4.x local mail directory ($HOME/nsmail or $PROFILE/Mail) - IMAP should default to $HOME/ns_imap/<hostname> or $PROFILE/ImapMail/<hostname>) - News should default to $PROFILE/xover-cache/<hostname> or $HOME/News/<hostname> (that's for unix and Windows, I dunno about Mac)
Bulk move mail/news M10 bugs to M11
Seth pointed out that some of these defaults come from 4.x: IMAP: mail.imap.root_dir News: news.directory POP: mail.directory What I'm going to do is create three new prefs: mail.root.<type> where type is the 5.x type {imap, pop3, nntp} and the 4.x prefs should migrate from there.
Blocks: 10947
Priority: P2 → P1
just noticed seth was doing some work on this, might be interested to see progress on this bug.
correction / clarification: - pop should default $PROFILE/Mail/<hostname> - IMAP should default to $PROFILE/ImapMail/<hostname> - News should default to $PROFILE/News/<hostname> this is for all three platforms. I'm going to do the work to migration the 4.x prefs (mail.imap.root_dir, news.directory, mail.directory) to the mail.root.<type> pref.
a slight twist that is related: nsINntpIncomingServer::SetNewsrcFilePath() needs a default. logged a bug for this. see #13306
the work to migrate the 4.x prefs is being tracked in bug #13305 since this bug depends on 13305, marking it at so.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
ok, this now falls back to pref("imap.server.<type>")/hostname if imap.server.<type> is not set, we have other problems. I'm working on that now.
Status: RESOLVED → VERIFIED
The current prefs.js uses the following: user_pref("mail.root.imap", "D:\\mozilla\\dist\\Users50\\mozProfile\\ImapMail"); user_pref("mail.root.none", "D:\\mozilla\\dist\\Users50\\mozProfile\\Mail"); user_pref("mail.root.pop3", "D:\\mozilla\\dist\\Users50\\mozProfile\\Mail"); This resolves the problem. VERIFIED after confirming with Alec
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.