Closed Bug 120559 Opened 23 years ago Closed 17 years ago

No error message when trying to create a folder with slash "/" in its name

Categories

(MailNews Core :: Backend, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: Peter_Flass, Assigned: sspitzer)

References

(Blocks 1 open bug)

Details

Attempting to create a new folder via File->New->Folder.
If I enter a name that contains a slash ('/') and click "OK",
_nothing_ happens.  If this is invalid, I would expect a message.
I assume this is a local folder and not an imap folder - Navin, did you work on
code to handle/prevent this? Or was it Cavin? I can't remember...Either this
should be disallowed, or it should work. OS/2 uses '\' as a directory separator,
right, so I'm not sure why '/' is confusing us.
Assignee: bienvenu → naving
Component: Mail Database → Mail Back End
This is marked as a forbidden character on windows and OS/2:

http://lxr.mozilla.org/seamonkey/source/mailnews/base/util/nsMsgUtils.cpp#238

As it should be since you cannot create a filename with this character

If you create a mail folder with one of these characters, rather than producing 
an error, it attempts to salt the foldername, and since salting of foldernames 
is completely broke, the folder doesn't work.

Incidentally, I tried creating a folder called / on the latest windows nightly,  
and it hung the whole browser.
OS: OS/2 → All
Hardware: PC → All
adding Seth to cc list since he understands the salting code.
Status: UNCONFIRMED → NEW
Ever confirmed: true
There are a few bugs related to creating local folders with special chars. See
bug 41944.
I believe this is a local folder issue. for new folder name 'a/b' it does nothing.

Currently for imap it creates parent 'a'(no select flag) and child 'b' if new
name is 'a/b', though we may have to check behavior w.r.t to other servers.  

For imap rename i had made it so that we do not accept / (if it is
hieracrchyDelimiter) in the new name. We can add the same behavior but above
is also ok. 

over to cavin since he is working on local folder names issue. 
Assignee: naving → cavin
QA Contact: esther → sheelar
QA Contact: sheelar → esther
*** Bug 184097 has been marked as a duplicate of this bug. ***
URL: N/A
Summary: Problem with create folder dialog → No error message when trying to create a folder with slash "/" in its name
*** Bug 217862 has been marked as a duplicate of this bug. ***
Bug also affects mail import from Eudora, but what I saw was that the import
would run, and a status (error?) window would display but with no information:
"Next" and "Back" were grayed out, and the only button I could press was
"Cancel," which then proceeded to erase the imported mail/mailboxes.  (See bug
217862 for more information).

No error text appears in the window when I try to import my entire "mailbox
hierarchy", but if I try to import a subset of my mail then I get errors like
the following:

**********
   Error importing mailbox Jokes/Forwards/Etc., unable to create destination mailbox
**********

The '/' (forward slash) appears to be the culprit.  In those cases, the internal
Eudora Folder name ("Jokes/Forwards/Etc.") is different than the name of the
file written to disk (JOKESFOR.FOL).  Two oddities about the import, though:

1) A Eudora folder with a ':' (colon) in it does not generate any errors (import
seems to be successful), and
2) A Eudora folder with a '/' (forward slash) only generates an error if it
contains messages; if it is a "container" folder that contains other mailboxes,
no error is generated.  Example:

   \ Eudora Mail
   + Alpha/beta      <- Contains messages; generates an error
   + Charlie/delta   <- No error, but doesn't contain any messages
     + Epsilon
     + Funkygruven


In case it matters, I've seen this bug in:
   * Every version of Mozilla that I tried between Mar 14, 2003 and Mozilla/5.0
(Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208
   * Mozilla Thunderbird 0.4 (20031205)
Assignee: cavin → sspitzer
QA Contact: esther
Product: MailNews → Core
"/" in local mail folder name is working well these several years, although it's still unclear which bug had fixed. See Bug 140212.
Closing as WORKSFORME, because no need to keep this old bug open. 
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.