/* general IMAP utility functions */
+#include "config.h"
+
#include "mutt.h"
#include "mx.h" /* for M_IMAP */
#include "url.h"
* in IMAP. Additionally, the filesystem converts multiple hierarchy
* delimiters into a single one, ie "///" is equal to "/". IMAP servers
* are not required to do this.
+ * Moreover, IMAP servers may dislike the path ending with the delimiter.
*/
char *imap_fix_path (IMAP_DATA *idata, char *mailbox, char *path,
size_t plen)
}
x++;
}
+ if (x && path[--x] != idata->delim)
+ x++;
path[x] = '\0';
return path;
}