Created attachment 329738 [details] [diff] [review] proposed fix If I create an imap saved search called "saved search", we end up creating folders on disk for "saved%20search" and often display that in the UI. The basic issue is that nsImapURI2Path doesn't handle escaped paths well - it doesn't deal with unescaping them at all. Luckily, nsImapURI2Path isn't used that often, which is why this isn't a problem in general. Usually, IMAP will explicitly call SetFilePath, so that GetFilePath never has to parse the imap uri to figure out the path. I made nsImapURI2Path look a lot more like nsLocalURI2Path. IMAP Saved searches now handle spaces in the name much better... An alternative is to make nsImapMailFolder::AddSubfolder call SetPath explicitly on the folder it creates, like nsImapMailFolder::AddSubfolderWithPath does, but that would be just as much work, and nsImapURI2Path should work.
Comment on attachment 329738 [details] [diff] [review] proposed fix >@@ -84,71 +84,64 @@ nsImapURI2Path(const char* rootURI, cons Is it worth trying to merge this with nsLocalURI2Path in nsMsgUtils.cpp?
(In reply to comment #1) > (From update of attachment 329738 [details] [diff] [review]) > >@@ -84,71 +84,64 @@ nsImapURI2Path(const char* rootURI, cons > Is it worth trying to merge this with nsLocalURI2Path in nsMsgUtils.cpp? > It would be nice, but it looked to me like they wanted different results - one wanted an nsILocalFile, and one wanted a string representation of the path for a uri, so it wasn't trivially obvious how they could be combined, other than to perhaps share code.
fixed (for new saved searches going forward)
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.