Ubikfr / freetuxtv

Automatically exported from code.google.com/p/freetuxtv
GNU General Public License v3.0
0 stars 0 forks source link

freetuxtv doesn't start if $HOME/.config/FreetuxTV/ does not exists #109

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

1. Build freetuxtv from source

2. Run it :

bash-3.2# /usr/linuxconsole/freetuxtv/bin/freetuxtv 
[FreetuxTV]    INFO       : Compiled with LibVLC version 1.1.4
[FreetuxTV]    INFO       : Loading FreetuxTV 0.5.2
...
[FreetuxTV]    INFO       : Using user configuration dir : 
/root/.config/FreetuxTV
[FreetuxTV]    INFO       : DBSync open database
[FreetuxTV]    INFO       : DBSync close database

FreetuxTV-ERROR **: Error Impossible d'ouvrir la base de données.

SQLite a retourné l'erreur :
unable to open database file.

aborting...
Aborted

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

3. To fix : "mkdir $HOME/.config/FreetuxTV/"

OR

apply this patch :

 --- freetuxtv-db-sync.c.orig    2010-12-13 08:32:03.000000000 +0000
+++ freetuxtv-db-sync.c 2010-12-13 08:56:27.000000000 +0000
@@ -117,8 +117,21 @@
        g_return_if_fail(*error == NULL);

        gchar *user_db;
+       gchar *user_db_path;
        int res;

+       user_db_path = g_build_filename(g_get_user_config_dir(), "FreetuxTV", 
NULL);
+        res = g_mkdir_with_parents (user_db_path, 0744);
+        if(res == 0){
+              g_log(FREETUXTV_LOG_DOMAIN, G_LOG_LEVEL_INFO,
+              "Directory created: %s\n", user_db_path);
+        }
+         else
+        {
+         g_log(FREETUXTV_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
+         "Cannot create directory: %s\n", user_db_path);
+        }
+
        user_db = g_build_filename(g_get_user_config_dir(),
                                   "FreetuxTV", "freetuxtv.db", NULL);

@@ -1490,4 +1503,4 @@
        }

        return bRes;
-}
\ No newline at end of file
+}

Original issue reported on code.google.com by y...@linuxconsole.org on 13 Dec 2010 at 9:17

GoogleCodeExporter commented 8 years ago
Add the good patch

Original comment by y...@linuxconsole.org on 13 Dec 2010 at 10:23

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you, I will add it.

Original comment by eric.beuque on 13 Dec 2010 at 10:25

GoogleCodeExporter commented 8 years ago

Original comment by eric.beuque on 13 Dec 2010 at 10:25

GoogleCodeExporter commented 8 years ago

Original comment by eric.beuque on 18 Dec 2010 at 5:29