diary r73 - in trunk: . src
- From: pwithnall svn gnome org
- To: svn-commits-list gnome org
- Subject: diary r73 - in trunk: . src
- Date: Sat, 16 Aug 2008 18:59:04 +0000 (UTC)
Author: pwithnall
Date: Sat Aug 16 18:59:04 2008
New Revision: 73
URL: http://svn.gnome.org/viewvc/diary?rev=73&view=rev
Log:
2008-08-16 Philip Withnall <philip tecnocode co uk>
* src/main.c: (main): Ensure the user's data directory exists
before
creating the database file. (Closes: #543963)
Modified:
trunk/ChangeLog
trunk/src/main.c
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c (original)
+++ trunk/src/main.c Sat Aug 16 18:59:04 2008
@@ -113,6 +113,10 @@
diary->gconf_client = gconf_client_get_default ();
#endif /* ENABLE_ENCRYPTION */
+ /* Ensure the DB directory exists */
+ if (g_file_test (g_get_user_data_dir (), G_FILE_TEST_IS_DIR) == FALSE)
+ g_mkdir_with_parents (g_get_user_data_dir (), 0700);
+
/* Open the DB */
db_filename = g_build_filename (g_get_user_data_dir (), "diary.db", NULL);
diary->storage_manager = diary_storage_manager_new (db_filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]