X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Frmf.c;h=3b532e0e591e029b3f26a09ff00e9840af96bc9a;hb=3d78b9c80a95f4e7885ed607018f9b1b9be559b4;hp=38a93ff86bd9adca00899107acf22bdf6c55d773;hpb=714b5c530ece27ea2835a313013f5b770163403c;p=mmh diff --git a/uip/rmf.c b/uip/rmf.c index 38a93ff..3b532e0 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -37,7 +37,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(); @@ -81,10 +81,8 @@ main(int argc, char **argv) } } - if (!context_find("path")) - free(path("./", TFOLDER)); if (!folder) { - folder = getfolder(1); + folder = getfolder(FCUR); defolder++; } if (strcmp(m_mailpath(folder), pwd()) == 0) @@ -100,9 +98,9 @@ main(int argc, char **argv) if (cp > newfolder) *cp = '\0'; else - strncpy(newfolder, getfolder(0), sizeof(newfolder)); + strncpy(newfolder, getfolder(FDEF), sizeof(newfolder)); } else { - strncpy(newfolder, getfolder(0), sizeof(newfolder)); + strncpy(newfolder, getfolder(FDEF), sizeof(newfolder)); } if (interactive) { @@ -241,7 +239,7 @@ rma(char *folder) ** "atr-something-folderpath", and remove them. */ for (np = m_defs, pp = NULL; np; np = np->n_next) { - if (ssequal("atr-", np->n_name) && + if (isprefix("atr-", np->n_name) && (j = strlen(np->n_name) - plen) > alen && *(np->n_name + j) == '-' && strcmp(cp, np->n_name + j + 1) == 0) {