0.9.10claws68
authorChristoph Hohmann <reboot@gmx.ch>
Sun, 23 May 2004 12:58:05 +0000 (12:58 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sun, 23 May 2004 12:58:05 +0000 (12:58 +0000)
* src/folder.c
        fix folder moving

ChangeLog.claws
configure.ac
src/folder.c

index 26de83f..9857b14 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-23 [christoph] 0.9.10claws68
+
+       * src/folder.c
+               fix folder moving
+
 2004-05-21 [paul]      0.9.10claws67
 
        * sync with 0.9.10cvs17
index 683af95..32ec7e5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=67
+EXTRA_VERSION=68
 
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
index 256dbca..32c4db8 100644 (file)
@@ -2316,7 +2316,7 @@ FolderItem *folder_item_move_recursive(FolderItem *src, FolderItem *dest)
 
        /* move messages */
        debug_print("Moving %s to %s\n", src->path, dest->path);
-       new_item = folder_create_folder(dest, g_basename(src->path));
+       new_item = folder_create_folder(dest, src->name);
        if (new_item == NULL) {
                printf("Can't create folder\n");
                return NULL;
@@ -2328,7 +2328,8 @@ FolderItem *folder_item_move_recursive(FolderItem *src, FolderItem *dest)
        /* move messages */
        log_message(_("Moving %s to %s...\n"), 
                        src->name, new_item->path);
-       folder_item_move_msgs(new_item, mlist);
+       if (mlist != NULL)
+               folder_item_move_msgs(new_item, mlist);
        
        /*copy prefs*/
        folder_item_prefs_copy_prefs(src, new_item);
@@ -2357,8 +2358,10 @@ FolderItem *folder_item_move_recursive(FolderItem *src, FolderItem *dest)
        old_id = folder_item_get_identifier(src);
        new_id = folder_item_get_identifier(new_item);
        debug_print("updating rules : %s => %s\n", old_id, new_id);
-       
-       src->folder->klass->remove_folder(src->folder, src);
+
+       /* if src supports removing, otherwise only copy folder */
+       if (src->folder->klass->remove_folder != NULL)  
+               src->folder->klass->remove_folder(src->folder, src);
        folder_write_list();
 
        if (old_id != NULL && new_id != NULL)