Improved pluspath() and used it instead of path() where appropriate.
[mmh] / sbr / path.c
index b3a8fff..3dd552c 100644 (file)
@@ -100,7 +100,7 @@ expath(char *name, int type)
        char buffer[BUFSIZ];
 
        if (type == TSUBCWF) {
-               /* @folder to +folder */
+               /* convert TSUBCWF to TFOLDER */
                snprintf(buffer, sizeof(buffer), "%s/%s",
                                getfolder(FCUR), name);
                name = m_mailpath(buffer);
@@ -166,7 +166,7 @@ expath(char *name, int type)
 
 
 /*
-**
+** Return a path name
 */
 char *
 path(char *name, int type)
@@ -189,5 +189,12 @@ path(char *name, int type)
 char *
 pluspath(char *name)
 {
-       return path(name+1, (*name == '+') ? TFOLDER : TSUBCWF);
+       switch (*name) {
+       case '+':
+               return path(name+1, TFOLDER);
+       case '@':
+               return path(name+1, TSUBCWF);
+       default:
+               return path(name, TFILE);
+       }
 }