aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/pas/pas-backend-file.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index b4a0555e76..f9e2c53a2d 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -8,6 +8,7 @@
#include "config.h"
#include <gtk/gtksignal.h>
+#include <gnome.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
@@ -1291,9 +1292,20 @@ pas_backend_file_load_uri (PASBackend *backend,
bf->priv->file_db = dbopen (filename, O_RDWR | O_CREAT, 0666, DB_HASH, NULL);
if (bf->priv->file_db) {
- char *id;
- id = do_create(backend, INITIAL_VCARD, NULL);
- g_free (id);
+ char *create_initial_file;
+ char *dir;
+
+ dir = g_dirname(filename);
+ create_initial_file = g_concat_dir_and_file(dir, "create-initial");
+
+ if (g_file_exists(create_initial_file)) {
+ char *id;
+ id = do_create(backend, INITIAL_VCARD, NULL);
+ g_free (id);
+ }
+
+ g_free(create_initial_file);
+ g_free(dir);
}
}