Open Bug 286523 Opened 20 years ago Updated 2 years ago

Unable to create saved search folder(virtual folder) properly when "/"(slash) in name (and after restart, problems such as garbages of folders, loss of mail folder etc. occur)

Categories

(MailNews Core :: Database, defect)

x86
All
defect

Tracking

(Not tracked)

People

(Reporter: World, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Thunderbird version 1.0+ (20050314) (in /latest-trunk)

(1) Try to create saved search folder(virtual folder) named "X/Y"
(2) Click "OK" (first click of "OK")    
Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.addSubfolder]"  nsresult:
"0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
chrome://messenger/content/commandglue.js :: CreateVirtualFolder :: line 1019" 
data: no]
(3) Click "OK" again    
Error: uncaught exception: [Exception... "Component returned failure code:
0x80550013 [nsIMsgFolder.addSubfolder]"  nsresult: "0x80550013 (<unknown>)" 
location: "JS frame :: chrome://messenger/content/commandglue.js ::
CreateVirtualFolder :: line 1019"  data: no]
(4) No folder file for "X/Y" was created under mail directry. 
    No "virtualFolders.dat" entry for "X/Y" was created.
Summary: chrome://messenger/content/commandglue.js :: CreateVirtualFolder :: line 1019" data: no] Unable to create saved search folder(virtual folder) of "/"(slash) in name. Error: uncaught exception: [Exception... "Component returned failure code: 0x80550013 [n… → Unable to create saved search folder(virtual folder) of "/"(slash) in name. Error: uncaught exception: [Exception... "Component returned failure code:
Summary: Unable to create saved search folder(virtual folder) of "/"(slash) in name. Error: uncaught exception: [Exception... "Component returned failure code: → location: "JS frame :: chrome://messenger/content/commandglue.js :: CreateVirtualFolder :: line 1019" data: no] Unable to create saved search folder(virtual folder) of "/"(slash) in name. Error: uncaught exception: [Exception... "Component returned failur…
Same result as comment #0 on /latest-trunk 2005-03-18 build.
But phenomenon on Thunderbird 1.0 was different.
 - Definition of search folder of "X/Y" issued no error.
 - The "X/Y" folder varnished when restart of Thunderbird.

Some changes looks to be applied after 1.0, but seems to still have problem in
special character handling for search folder name. 
 
[Test Result on Thunderbird 1.0 (Release build)]

 (1) Define virtual folder named "X/Y"
     (A) Folder display in folder pane
         Folder Name : "X/Y"
     (B) virtualFolders.dat entry
         uri=mailbox://mail-01@pop3.server.dummy-01/Test/X/Y
     (C) Directry listing after definition of virtual folder named "X/Y"
         Test.sbd
            <DIR>          X.sbd
         Test.sbd\X.sbd
                         0 Y
                     1,418 Y.msf
            <DIR>          Y.sbd
         Test.sbd\X.sbd\Y.sbd
            (No file exists)
 (2) Restart of Thunderbird
     ==> Folder of "X/Y" varnished. (Folder of "X" was not created.)
     (D) Directry listing after restart
         Test.sbd
            <DIR>          X      <== Created on restart
                     1,122 X.msf  <== Created on restart
            <DIR>          X.sbd
         Test.sbd\X
            (No file exists)
         Test.sbd\X.sbd
                         0 Y
                     1,325 Y.msf
            <DIR>          Y.sbd
         Test.sbd\X.sbd\Y.sbd
            (No file exists)
Changing summary according to change of phenomenon - no JavaScript error.
Summary: location: "JS frame :: chrome://messenger/content/commandglue.js :: CreateVirtualFolder :: line 1019" data: no] Unable to create saved search folder(virtual folder) of "/"(slash) in name. Error: uncaught exception: [Exception... "Component returned failur… → Unable to create proper saved search folder(virtual folder) when "/"(slash) in name. (X.sbd and X & X.msf for 'X/Y')
Summary: Unable to create proper saved search folder(virtual folder) when "/"(slash) in name. (X.sbd and X & X.msf for 'X/Y') → Unable to create proper saved search folder(virtual folder) when "/"(slash) in name. (X.sbd and Y & Y.msf for 'X/Y')
Phenomenon changed when latest-trunk.
With Tb latest-trunk(2005/10/14 build,Win-2K), creation of virtual folder "X/Y"
still doesn't complete, but,
 (a) X.sbd was not created.
 (b) Then X.sbd\Y nor X.sbd\Y.msf was not created.
 (c) However, folder name of "Y" appeared in folder selection menu.
I think (a) is a result of bug fix for problem of "'.sbd' is always created when
folder creation."
Since no directry/file is created, no problem after restart.
Current problem is only next two minor and trival problem.
(1) Virual folder named "X/Y" can not be created.
    (No action/response for "OK" button)
(2) Garbage of above (c)
Summary: Unable to create proper saved search folder(virtual folder) when "/"(slash) in name. (X.sbd and Y & Y.msf for 'X/Y') → Unable to create saved search folder(virtual folder) when "/"(slash) in name. (X.sbd and Y & Y.msf for 'X/Y')
(In addition to comment #3)
When X.sbd already exists(Folder X was defined and subfolder of X was defined),
X.sbd\Y and X.sbd\Y.msf were created for virtual folder "X/Y", as described in
comment #2.
virtualFolders.dat content is as follows;
 uri=mailbox://aaa@aaa.bbb.ccc/X/Y
This "X/Y" folder is usable normaly, even after restart of Thunderbord.

What a nice solution for "/" in a folder name issue!
No need to exclude "/" from "Legal file path characters", and is applicable to
"#" and "?" issues due to special URI characters... ;-)
Summary: Unable to create saved search folder(virtual folder) when "/"(slash) in name. (X.sbd and Y & Y.msf for 'X/Y') → Unable to create saved search folder(virtual folder) properly when "/"(slash) in name. (X.sbd and Y & Y.msf for 'X/Y')
Linux too. Using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a2pre) Gecko/20070107 Thunderbird/3.0a1 ID:2007010703
OS: Windows 2000 → All
Sorry to add a "me too" to this one, but I see this on:

Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.9a2pre) Gecko/20070130 MultiZilla/1.8.3.0a SeaMonkey/1.5a

Interestingly enough, I can create a regular folder with a slash in it, just not a saved search folder (same behavior as per WADA's comment #3). Naturally, being a tech, and running an operating system with a slash in its name, I run into this quite a bit (OS/2 Wireless, OS/2 ISP, OS/2 ...). ;-)
QA Contact: database
Has this been addressed on any platform as yet? I hjust ran into this little gem again with:

Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8.1.13) Gecko/20080326 MultiZilla/1.8.3.4e SeaMonkey/1.1.9

I can create regular POP3 folders with slashes in them, but saved searches don;t even generate an error message (the dialog just never closes). Evidently, we are using different (older) code for creating the saved search folders than we use to create "normal" folders.

I'm also reminded of bug#29926 which involves creating such folders via IMAP. I haven't yet tried, though my mail server (running CommuniGate Pro) is also running on OS/2, so I'm curious whether any of this code is related and whether both bugs could be fixed with one patch...

Cheers.
I would dupe this and bug 358208 (identical) for bug 312265

I reproduced the case in tb2+3 as described in 358208 (same as here) for all cases, saved searches with "/" or "LPT1" , with exactly same behavior.

I consider "consolidating" these 3 under 312265 cause it's more general in description. Any other management is ok, this one being more active.

bug 29926 is a bit different and I don't consider same issue (see my comm there)
Summary: Unable to create saved search folder(virtual folder) properly when "/"(slash) in name. (X.sbd and Y & Y.msf for 'X/Y') → Unable to create saved search folder(virtual folder) properly when "/"(slash) in name. (X.sbd and Y & Y.msf are created for 'X/Y')
Workaround:
Rename to "search folder with / in name" from "search folder without / in name".
(1) Create a saved search folder(virtual folder) of folder name without "/".
(2) Rename it to "X/Y"
    Folder file name is changed to X6520b6b7 and X6520b6b7.msf.
    This is same file name for usual local mail folder of "X/Y".
   (virtualFolders.dat content)
    uri=mailbox://x@pop3.x.x.x/X6520b6b7
   (X6520b6b7.msf content)
    <(80=1)(81=0)(82=482b7946)(8D=X/Y)(8A=24)(85=OR (tag,contains,abc___xyz\))
Additinal tests for Bug 286523 in order to see what happens when "/" is used in virtual folder name.
Tested with : Name=Thunderbird  Version=3.0a2pre  BuildID=2008052203 on MS WIn-XP SP2.
  Case-1 : <non_null ascii string> +<single "/"> + <non_null ascii string>
           (a slash at mid of virtual folder name)
  Case-2 : <preceding "/"(s)> + <non_null ascii string>
  Case-3 : <non_null ascii string> + <trailing "/"(s)>

Created files were similar to Bug 436032(rename of parent local mail folder when subfolder has "/" in name), but result was much complicated when virtual folder than result when local mail folder, because content of virtualFolders.dat has relation to phenomenon and problem.
Result may be worse than this test result when above <non_null ascii string> part is changed to null or space(s) when virtual folder.
Summary: Unable to create saved search folder(virtual folder) properly when "/"(slash) in name. (X.sbd and Y & Y.msf are created for 'X/Y') → Unable to create saved search folder(virtual folder) properly when "/"(slash) in name (and after restart, problems such as garbages of folders, loss of mail folder etc. occur)
Blocks: 358208
Product: Core → MailNews Core
I can still see this and I keep tripping over it from time to time.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2


Addes this bug to 
http://kb.mozillazine.org/Saved_Search#Creating_a_Saved_Search_folder
What about requesting blocking1.9.2 ? In my opinion virtual folders is a very important feature if you think about tagging. It should work properly.


Why I think virtual folders are important? Think google mail. Google mail has labels instead of folders. Messages can have labels two and messages with certain labels appear in the respecive label (folder). 

In my daily mail work flow I try to simulate this behaviour using Thunderbird. As such I use virtual folders. Each "saved search" is searching for a special tag. So I tag new mails immediately and archive them. I access them using virtual folders.
quick fix suggestion:

  TB does not allow for creation of saved searches (virtual folders) with
  names containing a slash "/".


long term solution:

  Saved searches (virtual folders) names adhere to the same naming rules
  as tags do (i.e. allow / in names).
No longer blocks: tb-enterprise
There is also strange behavior of virtual folders containing a slash if the parent folder is a local folder. When Thunderbird is restarted the part before the slash is a new folder and the virtual folder is subfolder of it.

Example: new virtual folder as subfolder of local folders: X/Y
after restart there is a folder named X with a virtual subfolder X/Y 
X -> X/Y (arrow means folder hierarchy).

If the parent folder is not a local folder it vanishes after restart. It should not be possible to create virtual folders with a slash in the name.

Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11
Assignee: mozilla → nobody
Yes that is strange that rename (handles '/' fine) behaves differently to create (creates unexpected subdirs if '/' is in the name).
Severity: major → normal
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: