Here are my notes - mostly a braindump for my own reference:

Local Folders

nsMsgLocalMailFolder::Rename() performs these steps:

1) calls nsIMsgPluggableStore::RenameFolder() to rename the raw filesystem 
artifacts:
     * mbox/maildir
     * any .sbd dir
     * .msf file (actually, I'm not sure this should be done by the msgStore)
2) updates the new folder's pretty name
3) checks up on any filters which might be referencing the folder
4) calls RenameSubFolders() which recursively creates new child folders, 
checking for filter usage as it goes.
5) detaches the old folder from the parent (and calls progagateDelete() on it) 
and adds the new one.
6) tells the nsIMsgFolderNotificationService that the folder has been renamed.


IMAP folders

nsImapMailFolder::Rename() just tells the server to rename the folder.
Later on, they'll be a nsImapIncomingServer::OnlineFolderRename() coming in, 
where the local imap folder renaming is handled.
I haven't picked all the way through this yet, but quick observations are:
1) if it's a virtual folder, it just calls nsMsgDBFolder::Rename() and leaves 
it at that.
2) the pluggable message store isn't used.
3) it calls both nsImapMailFolder::RenameClient() and 
nsImapMailFolder::RenameLocal(). RenameLocal() seems to be primarily concerned 
with renaming the local filesystem artifacts, while RenameClient() handles the 
folder hierarchy and assort imap-specific stuff.


Quick thoughts:

- The IMAP path should use the pluggable mail store to handle the filesystem 
artifacts.
- there _should_ be a whole heap of common functionality that can be shared 
between local and imap (including the nsMsgDBFolder::Rename() that imap virtual 
folders use).
- There's a whole load of folder deleting and rebuilding going on, which seems 
unnecessary and overly-complicated.
It seems like it _should_ be possible to just rename folders in place, rather 
than just ditching them completely and rebuilding them... (ie filesystem 
rename, then patch up affected URIs etc)
- that said, I'm sure this bug can be addressed with a quick-n-nasty patch for 
now.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/106737

Title:
  Renaming folder to same name but different case not allowed

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/106737/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to