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

This commit is contained in:
svenhoefer
2012-09-05 23:42:10 +02:00
parent ae73a950eb
commit 1e1a3265e6
2 changed files with 9 additions and 3 deletions

View File

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

View File

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