projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moved etcpath() from config/config.c to sbr/path.c
[mmh]
/
uip
/
refile.c
diff --git
a/uip/refile.c
b/uip/refile.c
index
34e55ce
..
b85186a
100644
(file)
--- a/
uip/refile.c
+++ b/
uip/refile.c
@@
-128,7
+128,7
@@
main(int argc, char **argv)
if (!(cp = *argp++) || *cp == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
if (!(cp = *argp++) || *cp == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
- folder = pluspath(cp);
+ folder = getcpy(expandfol(cp));
continue;
case FILESW:
if (filep > NFOLDERS)
continue;
case FILESW:
if (filep > NFOLDERS)
@@
-137,7
+137,7
@@
main(int argc, char **argv)
if (!(cp = *argp++) || *cp == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
if (!(cp = *argp++) || *cp == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
- files[filep++] = path(cp, TFILE);
+ files[filep++] = getcpy(expanddir(cp));
continue;
case RPROCSW:
continue;
case RPROCSW:
@@
-154,14
+154,11
@@
main(int argc, char **argv)
if (foldp > NFOLDERS)
adios(NULL, "only %d folders allowed!",
NFOLDERS);
if (foldp > NFOLDERS)
adios(NULL, "only %d folders allowed!",
NFOLDERS);
- folders[foldp++].f_name =
- pluspath(cp);
+ folders[foldp++].f_name = getcpy(expandfol(cp));
} else
} else
- app_msgarg(&msgs, cp);
+ app_msgarg(&msgs, cp);
}
}
- if (!context_find("path"))
- free(path("./", TFOLDER));
if (foldp == 0)
adios(NULL, "no folder specified");
if (foldp == 0)
adios(NULL, "no folder specified");
@@
-189,8
+186,8
@@
main(int argc, char **argv)
if (!msgs.size)
app_msgarg(&msgs, "cur");
if (!folder)
if (!msgs.size)
app_msgarg(&msgs, "cur");
if (!folder)
- folder = getfolder(FCUR);
- strncpy(maildir, m_maildir(folder), sizeof(maildir));
+ folder = getcurfol();
+ strncpy(maildir, toabsdir(folder), sizeof(maildir));
if (chdir(maildir) == NOTOK)
adios(maildir, "unable to change directory to");
if (chdir(maildir) == NOTOK)
adios(maildir, "unable to change directory to");
@@
-234,7
+231,7
@@
main(int argc, char **argv)
** directory. This should be moved to folder_delmsgs().
*/
if (rmmproc) {
** directory. This should be moved to folder_delmsgs().
*/
if (rmmproc) {
- context_replace(pfolder, folder);
+ context_replace(curfolder, folder);
context_save();
fflush(stdout);
}
context_save();
fflush(stdout);
}
@@
-256,7
+253,7
@@
main(int argc, char **argv)
seq_setcur(mp, mp->hghsel);
seq_save(mp); /* synchronize message sequences */
seq_setcur(mp, mp->hghsel);
seq_save(mp); /* synchronize message sequences */
- context_replace(pfolder, folder); /* update current folder */
+ context_replace(curfolder, folder); /* update current folder */
context_save(); /* save the context file */
folder_free(mp); /* free folder structure */
done(0);
context_save(); /* save the context file */
folder_free(mp); /* free folder structure */
done(0);
@@
-277,8
+274,8
@@
opnfolds(struct st_fold *folders, int nfolders)
register struct msgs *mp;
for (fp = folders, ep = folders + nfolders; fp < ep; fp++) {
register struct msgs *mp;
for (fp = folders, ep = folders + nfolders; fp < ep; fp++) {
- chdir(m_maildir(""));
- strncpy(nmaildir, m_maildir(fp->f_name), sizeof(nmaildir));
+ chdir(toabsdir("+"));
+ strncpy(nmaildir, toabsdir(fp->f_name), sizeof(nmaildir));
create_folder(nmaildir, 0, done);
create_folder(nmaildir, 0, done);