+2004-03-12 [christoph] 0.9.10claws5
+
+ * src/folderview.c
+ Add error requester when renaming a folder failed
+
+ * src/imap.c
+ Check new FolderItem name for namespace seperator
+ before renaming
+
+ (Closes Bug 443 Bad named IMAP folders won't be displayed)
+
2004-03-11 [christoph] 0.9.10claws4
* src/folder.[ch]
MICRO_VERSION=10
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=4
+EXTRA_VERSION=5
if test $EXTRA_VERSION -eq 0; then
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
else
MsgInfo *msginfo,
MsgPermFlags newflags);
/**
- * Get the flags for a list of messages
+ * Get the flags for a list of messages. Flags that are not supported
+ * by the folder should be preserved. They can be copied from
+ * \c msginfo->flags.perm_flags
*
* \param folder The \c Folder of the messages
* \param item The \c FolderItem of the messages
* \param msglist The list of \c MsgInfos for which the flags should
* be returned
- * \param msgflags A \c GRelation for tuples of (message number,
- * permanent flags). Add tuples for the messages in msgnumlist
+ * \param msgflags A \c GRelation for tuples of (MsgInfo, new permanent
+ * flags for MsgInfo). Add tuples for the messages in msglist
* \return 0 on success, a negative number otherwise
*/
gint (*get_flags) (Folder *folder,
}
Xstrdup_a(old_path, item->path, {g_free(new_folder); return;});
- old_id = folder_item_get_identifier(item);
if (item->folder->klass->rename_folder(item->folder, item, new_folder) < 0) {
- g_free(old_id);
+ alertpanel_error(_("The folder could not be renamed.\n"
+ "The new folder name could not be allowed."));
return;
}
+ old_id = folder_item_get_identifier(item);
/* if (FOLDER_TYPE(item->folder) == F_MH)
prefs_filtering_rename_path(old_path, item->path); */
new_id = folder_item_get_identifier(item);
g_return_val_if_fail(item->path != NULL, -1);
g_return_val_if_fail(name != NULL, -1);
+ if (strchr(name, imap_get_path_separator(folder, item->path)) != NULL) {
+ g_warning(_("New folder name must not contain the namespace "
+ "path seperator"));
+ return -1;
+ }
+
session = imap_session_get(folder);
if (!session) return -1;