[API] nsIMsgIncomingServer::SetLocalPath needs a default

VERIFIED FIXED in M11

Status

P1
normal
VERIFIED FIXED
20 years ago
2 years ago

People

(Reporter: tonyr, Assigned: alecf)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

20 years ago
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.

Comment 1

20 years ago
Can we mark this M10?
(Assignee)

Updated

20 years ago
Status: NEW → ASSIGNED
Target Milestone: M10

Updated

20 years ago
QA Contact: lchiang → ppandit
(Assignee)

Updated

20 years ago
Priority: P3 → P2
(Assignee)

Comment 2

20 years ago
this is probably something that each type of server needs to override for itself
when the hostname gets set.
(Assignee)

Updated

20 years ago
Summary: nsIMsgIncomingServer::SetLocalPath needs a default → [API] nsIMsgIncomingServer::SetLocalPath needs a default
(Assignee)

Comment 3

20 years ago
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)

Comment 4

20 years ago
Bulk move mail/news M10 bugs to M11
(Assignee)

Comment 5

20 years ago
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.
(Assignee)

Updated

20 years ago
Blocks: 10947
(Assignee)

Updated

20 years ago
Priority: P2 → P1
(Assignee)

Comment 6

20 years ago
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.
(Assignee)

Updated

20 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
(Assignee)

Comment 10

20 years ago
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.

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 11

19 years ago
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.