diff options
-rw-r--r-- | src/empathy-import-dialog.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/empathy-import-dialog.c b/src/empathy-import-dialog.c index e726e1e3c..ad90a8e17 100644 --- a/src/empathy-import-dialog.c +++ b/src/empathy-import-dialog.c @@ -27,6 +27,7 @@ #include <gtk/gtk.h> #include <glade/glade.h> #include <glib/gi18n.h> +#include <glib/gstdio.h> #include <libxml/parser.h> #include <libxml/tree.h> @@ -284,8 +285,11 @@ import_dialog_pidgin_load (void) ctxt = xmlNewParserCtxt (); filename = g_build_filename (g_get_home_dir (), ".purple", "accounts.xml", NULL); + + if (g_access (filename, R_OK) != 0) + goto FILENAME; + doc = xmlCtxtReadFile (ctxt, filename, NULL, 0); - g_free (filename); rootnode = xmlDocGetRootElement (doc); if (rootnode == NULL) @@ -408,6 +412,9 @@ OUT: xmlFreeDoc(doc); xmlFreeParserCtxt (ctxt); +FILENAME: + g_free (filename); + return accounts; } |