summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-12-01 09:28:17 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-12-01 09:28:17 +0100
commit991fac3d8cfac3b4f4ba45c1271c806cedd39ee9 (patch)
treed3dc29f72afdcfe3ace7b4cdf29b27eed98d1c99
parentdd24d2c07f4d25572488abc8f5375d76ecee0039 (diff)
downloadeurephia-991fac3d8cfac3b4f4ba45c1271c806cedd39ee9.tar.gz
eurephia-991fac3d8cfac3b4f4ba45c1271c806cedd39ee9.tar.xz
eurephia-991fac3d8cfac3b4f4ba45c1271c806cedd39ee9.zip
BUGFIX: Fixed missing slash when env.var. EUREHPIA_DIR is used
-rw-r--r--eurephiadm/eurephiadm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eurephiadm/eurephiadm.c b/eurephiadm/eurephiadm.c
index 9c98a02..aa1bcf6 100644
--- a/eurephiadm/eurephiadm.c
+++ b/eurephiadm/eurephiadm.c
@@ -136,7 +136,8 @@ char *get_config_file(const char *env, const char *file) {
// Use the explicit set eurephia session directory for a session file
if( ((ptr = getenv("EUREPHIA_DIR")) != NULL) && (strlen_nullsafe(ptr) <= 1016) ) {
- strncat(fname, ptr, flen);
+ strncat(fname, ptr, flen-1);
+ strcat(fname, "/");
strcat(fname, file);
// Make sure we have this directory
if( stat(ptr, &chk) == -1 ) {