Completely reworked the path convertion functions
[mmh] / uip / pick.c
index 93a2400..2efac42 100644 (file)
@@ -182,15 +182,12 @@ 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);
        }
        vec[vecp] = NULL;
 
-       if (!context_find("path"))
-               free(path("./", TFOLDER));
-
        /*
        ** If we didn't specify which messages to search,
        ** then search the whole folder.
@@ -199,8 +196,8 @@ main(int argc, char **argv)
                app_msgarg(&msgs, "all");
 
        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");