diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-03-23 10:09:29 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-03-23 10:09:29 +0800 |
commit | 35c7cc901818b753634113241f1d85231d4624c3 (patch) | |
tree | 36c225a7d4a2ed0f4f4ba6931fda38827134e1fe /mail/importers/netscape-importer.c | |
parent | 01e19198a88f491251dd2c3d824bd771eebc3e3e (diff) | |
download | gsoc2013-evolution-35c7cc901818b753634113241f1d85231d4624c3.tar gsoc2013-evolution-35c7cc901818b753634113241f1d85231d4624c3.tar.gz gsoc2013-evolution-35c7cc901818b753634113241f1d85231d4624c3.tar.bz2 gsoc2013-evolution-35c7cc901818b753634113241f1d85231d4624c3.tar.lz gsoc2013-evolution-35c7cc901818b753634113241f1d85231d4624c3.tar.xz gsoc2013-evolution-35c7cc901818b753634113241f1d85231d4624c3.tar.zst gsoc2013-evolution-35c7cc901818b753634113241f1d85231d4624c3.zip |
Fix some warnings, Allow the importers to import into any folder. Update
Fix some warnings,
Allow the importers to import into any folder.
Update all importers for this change.
Don't emit the create_folder callback if the folder to be created already exists.
This should fix the libibex crash when importing.
svn path=/trunk/; revision=8912
Diffstat (limited to 'mail/importers/netscape-importer.c')
-rw-r--r-- | mail/importers/netscape-importer.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mail/importers/netscape-importer.c b/mail/importers/netscape-importer.c index 8752ce4de9..9a6ec5eac9 100644 --- a/mail/importers/netscape-importer.c +++ b/mail/importers/netscape-importer.c @@ -44,6 +44,8 @@ #include <importer/evolution-intelligent-importer.h> #include <importer/GNOME_Evolution_Importer.h> +#include <evolution-storage.h> + #include "mail-importer.h" #include "mail-tools.h" @@ -52,6 +54,7 @@ static char *nsmail_dir = NULL; extern char *evolution_dir; #define NETSCAPE_INTELLIGENT_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Netscape_Intelligent_Importer_Factory" +#define MBOX_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory" #define KEY "netscape-mail-imported" /*#define SUPER_IMPORTER_DEBUG*/ @@ -229,7 +232,7 @@ netscape_import_file (NetscapeImporter *importer, char *protocol; CamelException *ex; CamelFolder *folder; - + /* Do import */ d(g_warning ("Importing %s as %s\n", filename, fullpath)); @@ -242,6 +245,8 @@ netscape_import_file (NetscapeImporter *importer, return; } + g_free (protocol); + if (folder == NULL) { g_warning ("Folder for %s is NULL", fullpath); camel_exception_free (ex); @@ -267,6 +272,7 @@ netscape_dir_created (BonoboListener *listener, CORBA_Environment *ev, NetscapeImporter *importer) { + EvolutionStorageResult storage_result; NetscapeCreateDirectoryData *data; GList *l; GNOME_Evolution_Storage_FolderResult *result; @@ -277,8 +283,11 @@ netscape_dir_created (BonoboListener *listener, } result = event_data->_value; + storage_result = result->result; fullpath = result->path; + g_warning ("path: %s\tresult: %d", fullpath, storage_result); + l = importer->dir_list; importer->dir_list = g_list_remove_link (importer->dir_list, l); data = l->data; @@ -286,7 +295,8 @@ netscape_dir_created (BonoboListener *listener, /* Import the file */ /* We got the folder, so try to import the file into it. */ - netscape_import_file (data->importer, data->path, fullpath); + if (fullpath != NULL || *fullpath != '\0') + netscape_import_file (data->importer, data->path, fullpath); g_free (data->parent); g_free (data->path); |