Changeset 2506

Show
Ignore:
Timestamp:
07/26/07 14:29:20
Author:
pvanhoof
Message:

Folder renaming for local folders

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r2503 r2506  
    33        * More granularity in the locking of the POP code 
    44        * Several fixes in the POP code 
     5        * Folder renaming for local folders 
    56 
    672007-07-25  Philip Van Hoof  <pvanhoof@gnome.org> 
  • trunk/libtinymail-camel/camel-lite/camel/providers/local/camel-local-store.c

    r2464 r2506  
    375375        char *newibex = g_strdup_printf("%s%s.ibex", path, new); 
    376376        char *oldibex = g_strdup_printf("%s%s.ibex", path, old); 
     377        CamelException nex = CAMEL_EXCEPTION_INITIALISER; 
    377378 
    378379        /* try to rollback failures, has obvious races */ 
     
    392393        } 
    393394 
    394         xrename(old, new, path, ".ev-summary.mmap", TRUE, ex); 
    395  
    396         xrename(old, new, path, ".cmeta", TRUE, ex); 
    397  
    398         xrename(old, new, path, "", FALSE, ex); 
     395        xrename(old, new, path, ".ev-summary.mmap", TRUE, &nex); 
     396        xrename(old, new, path, ".cmeta", TRUE, &nex); 
     397        xrename(old, new, path, "", FALSE, &nex); 
    399398 
    400399        g_free(newibex); 
  • trunk/libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-store.c

    r2440 r2506  
    539539                } 
    540540                fi->flags &= ~CAMEL_FOLDER_CHILDREN; 
    541                 fi->flags |= CAMEL_FOLDER_VIRTUAL|CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_NOCHILDREN|CAMEL_FOLDER_NOINFERIORS|CAMEL_FOLDER_TYPE_INBOX; 
     541                fi->flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_NOCHILDREN|CAMEL_FOLDER_NOINFERIORS|CAMEL_FOLDER_TYPE_INBOX; 
    542542        } else if (!strcmp(top, ".")) { 
    543543                fi = scan_fi(store, flags, url, ".", _("Inbox")); 
  • trunk/libtinymail/tny-folder.c

    r2485 r2506  
    320320 * be set in @err and no further action will be performed. 
    321321 *  
    322  * Return value: a new folder instance to whom was copied 
     322 * Return value: a new folder instance to whom was copied or NULL in case of failure 
    323323 **/ 
    324324TnyFolder*  
     
    339339 
    340340#ifdef DBC /* ensure */ 
    341         g_assert (retval); 
    342         g_assert (!strcmp (tny_folder_get_name (retval), new_name)); 
    343         test = tny_folder_get_folder_store (retval); 
    344         g_assert (test); 
    345         g_assert (TNY_IS_FOLDER_STORE (test)); 
    346         g_assert (test == into); 
    347         g_object_unref (G_OBJECT (test)); 
     341        if (retval) { 
     342                g_assert (!strcmp (tny_folder_get_name (retval), new_name)); 
     343                test = tny_folder_get_folder_store (retval); 
     344                g_assert (test); 
     345                g_assert (TNY_IS_FOLDER_STORE (test)); 
     346                g_assert (test == into); 
     347                g_object_unref (G_OBJECT (test)); 
     348        } 
    348349#endif 
    349350