* move config handling to mu-config, add --mode parameter for mkdir

This commit is contained in:
Dirk-Jan C. Binnema
2010-01-21 20:05:19 +02:00
parent fc64926c63
commit 2ef4ceb7ed
4 changed files with 82 additions and 97 deletions

View File

@ -471,15 +471,14 @@ cmd_mkdir (MuConfigOptions *opts)
return FALSE; /* shouldn't happen */
if (!opts->params[1]) {
g_printerr ("usage: mu mkdir <dir> [more dirs]\n");
g_printerr (
"usage: mu mkdir [-u,--mode=<mode>] <dir> [more dirs]\n");
return FALSE;
}
i = 1;
while (opts->params[i]) {
MU_WRITE_LOG ("mu_maildir_mkdir (%s, 0755, FALSE)",
opts->params[i]);
if (!mu_maildir_mkmdir (opts->params[i], 0755, FALSE))
if (!mu_maildir_mkmdir (opts->params[i], opts->dirmode, FALSE))
return FALSE;
++i;
}