* mu-maildir.c: allow for names without !/:
This commit is contained in:
@ -799,13 +799,15 @@ get_new_file_name (const char *oldpath, MuMsgFlags flags)
|
|||||||
|
|
||||||
/* the normal separator is ':', but on e.g. vfat, '!' is seen
|
/* the normal separator is ':', but on e.g. vfat, '!' is seen
|
||||||
* as well */
|
* as well */
|
||||||
newname = g_path_get_basename (oldpath);
|
newname = g_path_get_basename (oldpath);
|
||||||
if (!newname) {
|
if (!newname) {
|
||||||
g_warning ("invalid path: '%s'", oldpath);
|
g_warning ("invalid path: '%s'", oldpath);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(sep = g_strrstr (newname, ":")) &&
|
sep = ":";
|
||||||
|
if (!(flags & MU_MSG_FLAG_NEW) &&
|
||||||
|
!(sep = g_strrstr (newname, ":")) &&
|
||||||
!(sep = g_strrstr (newname, "!"))) {
|
!(sep = g_strrstr (newname, "!"))) {
|
||||||
g_warning ("not a valid msg file name: '%s'", oldpath);
|
g_warning ("not a valid msg file name: '%s'", oldpath);
|
||||||
g_free (newname);
|
g_free (newname);
|
||||||
@ -848,6 +850,7 @@ mu_maildir_get_path_from_flags (const char *oldpath, MuMsgFlags newflags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
newpath = g_strdup_printf ("%s%c%s", newdir, G_DIR_SEPARATOR, newname);
|
newpath = g_strdup_printf ("%s%c%s", newdir, G_DIR_SEPARATOR, newname);
|
||||||
|
|
||||||
g_free (newname);
|
g_free (newname);
|
||||||
g_free (newdir);
|
g_free (newdir);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user