tuxtxt: fix creation of /var/tuxbox/config/tuxtxt/

Origin commit data
------------------
Commit: 1e1a3265e6
Author: vanhofen <vanhofen@gmx.de>
Date: 2012-09-05 (Wed, 05 Sep 2012)

Origin message was:
------------------
- tuxtxt: fix creation of /var/tuxbox/config/tuxtxt/
This commit is contained in:
vanhofen
2012-09-05 23:42:10 +02:00
parent 205bb3bc65
commit df315c7b0f
2 changed files with 9 additions and 3 deletions

View File

@@ -18,6 +18,7 @@
#include "driver/framebuffer.h" #include "driver/framebuffer.h"
#include <dmx.h> #include <dmx.h>
#include <video.h> #include <video.h>
#include <sys/stat.h>
/* same as in rcinput.h... */ /* same as in rcinput.h... */
#define KEY_TTTV KEY_FN_1 #define KEY_TTTV KEY_FN_1
@@ -82,7 +83,7 @@ void gethotlist()
hotlistchanged = 0; hotlistchanged = 0;
maxhotlist = -1; maxhotlist = -1;
sprintf(line, CONFIGDIR "/tuxtxt/hotlist%d.conf", tuxtxt_cache.vtxtpid); sprintf(line, TUXTXTDIR "/hotlist%d.conf", tuxtxt_cache.vtxtpid);
#if TUXTXT_DEBUG #if TUXTXT_DEBUG
printf("TuxTxt <gethotlist %s", line); printf("TuxTxt <gethotlist %s", line);
#endif #endif
@@ -128,7 +129,7 @@ void savehotlist()
int i; int i;
hotlistchanged = 0; hotlistchanged = 0;
sprintf(line, CONFIGDIR "/tuxtxt/hotlist%d.conf", tuxtxt_cache.vtxtpid); sprintf(line, TUXTXTDIR "/hotlist%d.conf", tuxtxt_cache.vtxtpid);
#if TUXTXT_DEBUG #if TUXTXT_DEBUG
printf("TuxTxt <savehotlist %s", line); printf("TuxTxt <savehotlist %s", line);
#endif #endif
@@ -1915,6 +1916,10 @@ int Init(int source)
/* init lcd */ /* init lcd */
UpdateLCD(); UpdateLCD();
/* create TUXTXTDIR if necessary */
if (!access(TUXTXTDIR, F_OK) == 0)
mkdir(TUXTXTDIR, 0755);
/* config defaults */ /* config defaults */
screenmode = 0; screenmode = 0;
screen_mode1 = 0; screen_mode1 = 0;

View File

@@ -64,7 +64,8 @@ extern int tuxtxt_get_zipsize(int p, int sp);
#endif #endif
#define TUXTXTCONF CONFIGDIR "/tuxtxt/tuxtxt2.conf" #define TUXTXTDIR CONFIGDIR "/tuxtxt"
#define TUXTXTCONF TUXTXTDIR "/tuxtxt2.conf"
/* fonts */ /* fonts */
#define TUXTXTTTF FONTDIR "/tuxtxt.ttf" #define TUXTXTTTF FONTDIR "/tuxtxt.ttf"