Completely reworked the path convertion functions
[mmh] / uip / anno.c
index a2cfc84..ec3590c 100644 (file)
@@ -99,7 +99,7 @@ main(int argc, char **argv)
 #ifdef LOCALE
        setlocale(LC_ALL, "");
 #endif
-       invo_name = r1bindex(argv[0], '/');
+       invo_name = mhbasename(argv[0]);
 
        /* read user profile/context */
        context_read();
@@ -198,7 +198,7 @@ main(int argc, char **argv)
                        if (folder)
                                adios(NULL, "only one folder at a time!");
                        else
-                               folder = pluspath(cp);
+                               folder = getcpy(expandfol(cp));
                } else
                        app_msgarg(&msgs, cp);
        }
@@ -208,13 +208,11 @@ main(int argc, char **argv)
                datesw = 0;
 #endif /* UCI */
 
-       if (!context_find("path"))
-               free(path("./", TFOLDER));
        if (!msgs.size)
                app_msgarg(&msgs, "cur");
        if (!folder)
-               folder = getfolder(1);
-       maildir = m_maildir(folder);
+               folder = getcurfol();
+       maildir = toabsdir(folder);
 
        if (chdir(maildir) == NOTOK)
                adios(maildir, "unable to change directory to");