diff options
| -rw-r--r-- | config.h | 2 | ||||
| -rw-r--r-- | src/base/arenaFile.c | 2 | ||||
| -rwxr-xr-x | src/base/director.c | 11 | ||||
| -rw-r--r-- | src/base/path.h | 7 |
4 files changed, 16 insertions, 6 deletions
@@ -1 +1 @@ -#define TUXANCI_NG_VERSION "svn141" +#define TUXANCI_NG_VERSION "svn142" diff --git a/src/base/arenaFile.c b/src/base/arenaFile.c index 1ced97a..f64cc1c 100644 --- a/src/base/arenaFile.c +++ b/src/base/arenaFile.c @@ -239,7 +239,7 @@ void initArenaFile() isArenaFileInit = TRUE; listArenaFile = newList(); p = loadDirector(PATH_ARENA); - + printf ("Pocet aren: %d\n", p->list->count); for( i = 0 ; i < p->list->count ; i++ ) { char *line; diff --git a/src/base/director.c b/src/base/director.c index 1877a8b..fd89611 100755 --- a/src/base/director.c +++ b/src/base/director.c @@ -29,17 +29,22 @@ director_t* loadDirector(char *s) memset(new, 0, sizeof(director_t) ); new->list = newList(); - +#ifndef __WIN32__ if( s[0] == '/' ) +#else + if( s[1] == ':' ) +#endif { strcpy(path, s); } else { + // tohle je opravdu dobre... getcwd(path, STR_PATH_SIZE); - strcat(path, s+1); + strcat(path, "/"); + strcat(path, s); } - + printf("%s\n", path); new->path = strdup(path); dir = opendir(new->path); diff --git a/src/base/path.h b/src/base/path.h index d647710..346f71d 100644 --- a/src/base/path.h +++ b/src/base/path.h @@ -15,13 +15,18 @@ #ifndef PUBLIC_SERVER #define PATH_DIR PREFIX "/share/tuxanci-ng/" +#ifndef __WIN32__ #define PATH_MODULES PREFIX "/lib/tuxanci-ng/" #else + #define PATH_MODULES PREFIX "/bin/" +#endif +#else #define PATH_DIR PREFIX "/share/tuxanci-ng-server/" - #define PATH_MODULES PREFIX "/lib/tuxanci-ng-server/" #ifndef __WIN32__ + #define PATH_MODULES PREFIX "/lib/tuxanci-ng-server/" #define SERVER_CONFIG "/etc/tuxanci-ng-server/server.conf" #else + #define PATH_MODULES PREFIX "/bin" #define SERVER_CONFIG PREFIX "/etc/tuxanci-ng-server/server.conf" #endif #endif |