Enlightenment CVS committal

Author  : titan
Project : e17
Module  : proto

Dir     : e17/proto/ephoto/src/bin


Modified Files:
        ephoto_database.c 


Log Message:
Whoops. Make sure the directory exists, if not, create it.

===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/bin/ephoto_database.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ephoto_database.c   28 Jan 2007 13:37:18 -0000      1.4
+++ ephoto_database.c   29 Jan 2007 07:52:38 -0000      1.5
@@ -17,12 +17,18 @@
 sqlite3 *ephoto_db_init(void)
 {
        char path[PATH_MAX];
+       char path2[PATH_MAX];
        sqlite3 *db;
 
        snprintf(path, PATH_MAX, "%s/.ephoto/.ephoto_database", getenv("HOME"));
+       snprintf(path2, PATH_MAX, "%s/.ephoto", getenv("HOME"));
 
        if (!ecore_file_exists(path))
        {
+               if (!ecore_file_exists(path2))
+               {
+                       ecore_file_mkdir(path2);
+               }
                sqlite3_open(path, &db);
                sqlite3_exec(db, "CREATE TABLE 'albums'( "
                                 "id INTEGER PRIMARY KEY AUTOINCREMENT, "



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to