* make error messages more consistent
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
**
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
|
||||
@ -84,7 +84,8 @@ save_part_if (MuMsgPart *part, SaveData *sd)
|
||||
* the attachment check may be a bit too strict */
|
||||
if (sd->attachments_only)
|
||||
if (!part->disposition ||
|
||||
((g_ascii_strcasecmp (part->disposition, "attachment") != 0) &&
|
||||
((g_ascii_strcasecmp (part->disposition,
|
||||
"attachment") != 0) &&
|
||||
g_ascii_strcasecmp (part->disposition, "inline")))
|
||||
return;
|
||||
|
||||
@ -103,8 +104,8 @@ save_part_if (MuMsgPart *part, SaveData *sd)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
save_certain_parts (MuMsg *msg, gboolean attachments_only, const gchar *targetdir,
|
||||
gboolean overwrite)
|
||||
save_certain_parts (MuMsg *msg, gboolean attachments_only,
|
||||
const gchar *targetdir, gboolean overwrite)
|
||||
{
|
||||
SaveData sd;
|
||||
|
||||
@ -204,17 +205,19 @@ static gboolean
|
||||
check_params (MuConfigOptions *opts)
|
||||
{
|
||||
if (!opts->params[1]) {
|
||||
g_warning ("missing mail file to extract something from");
|
||||
g_warning ("usage: mu extract [options] <file>");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!mu_util_check_dir(opts->targetdir, FALSE, TRUE)) {
|
||||
g_warning ("target '%s' is not a writable directory", opts->targetdir);
|
||||
g_warning ("target '%s' is not a writable directory",
|
||||
opts->targetdir);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (opts->save_attachments && opts->save_all) {
|
||||
g_warning ("only one of --save-attachments and --save-all is allowed");
|
||||
g_warning ("only one of --save-attachments and"
|
||||
" --save-all is allowed");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user