Author Topic: Folders and subfolders containing delimiters  (Read 5592 times)

Offline Thardus

  • Newbie
  • *
  • Posts: 8
Folders and subfolders containing delimiters
« on: February 10, 2010, 08:37:42 PM »
I've implemented RoundCube at our company and I have had nothing but great feedback.  I'm quite impressed with it as well.  I'm having an issue however with creating subfolders.  Anytime I try to create a parent folder, I get "Folder name contains a forbidden character (/)"

I tried creating a parent folder by entering something like "test/".  Once I commented out the following two lines of code, it mostly worked:

line 3257 of program/js/app.js:

Code: [Select]
     if (name.indexOf(this.env.delimiter)>=0)
        {
        //alert(this.get_label('forbiddencharacter')+' ('+this.env.delimiter+')');
        //return false;
        }


Now when I enter "test/" it will create the folder but it won't refresh the page to show the newly created folder.  After I refreshed it, I was able to add subfolders under "test/" just fine.  I can also create parent and child folders at the same time (eg test/aaa) and it works but I still need to refresh the page for the "test/" parent folder to show even though 'aaa' will magically appear in the list.

So, my questions are 1) Why is the javascript validating in the manner? and 2) If I'm on the right path, how do I make it so I don't have to 'refresh' the page to see the newly added parent folder?  I'm sure more validation needs to be stripped off.

I'm using dovecot on all of our servers but I don't think it has anything to do with this current problem. I'm also runing revision 3261   

Thanks for your help.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Folders and subfolders containing delimiters
« Reply #1 on: February 11, 2010, 03:01:18 AM »
Just don't use directory separator in folder name

Offline Thardus

  • Newbie
  • *
  • Posts: 8
Folders and subfolders containing delimiters
« Reply #2 on: February 11, 2010, 11:58:50 AM »
Quote from: alec;25438
Just don't use directory separator in folder name


I'm able to successfully create a folder without the separator however when I try to create a subfolder under it, I get the following:

"An error occured while saving"

Offline Thardus

  • Newbie
  • *
  • Posts: 8
Folders and subfolders containing delimiters
« Reply #3 on: February 11, 2010, 04:50:38 PM »
I'm now using MailDir instead of mbox for mail storage and everything is behaving properly.

Offline kenai

  • Newbie
  • *
  • Posts: 3
Folders and subfolders containing delimiters
« Reply #4 on: November 04, 2011, 07:20:18 AM »
Hello Thardus,

Have you managed to achieve the same feature using roundcubemail-0.6? I use mbox format and cannot create subfolders of any folder except for the inbox, which works pretty fine. If you are using an email client, like Thunderbird for instance, it will let you choose between "Folder containing messages" or "Folder containing folders" whenever you want to create a new folder.