[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1101 - GNUnet/src/conf
From: |
durner |
Subject: |
[GNUnet-SVN] r1101 - GNUnet/src/conf |
Date: |
Mon, 27 Jun 2005 14:01:17 -0700 (PDT) |
Author: durner
Date: 2005-06-27 14:01:13 -0700 (Mon, 27 Jun 2005)
New Revision: 1101
Modified:
GNUnet/src/conf/confdata.c
Log:
fix
Modified: GNUnet/src/conf/confdata.c
===================================================================
--- GNUnet/src/conf/confdata.c 2005-06-27 20:24:56 UTC (rev 1100)
+++ GNUnet/src/conf/confdata.c 2005-06-27 21:01:13 UTC (rev 1101)
@@ -137,15 +137,21 @@
sprintf(key, "%s_CONF_DEF_FILE", fn);
defFile = sym_find(key, "Meta");
if (defFile) {
- char *path, *file;
+ char *path, *file, c;
+ int pathLen;
sym_calc_value_ext(sym, 1);
sym_calc_value_ext(defFile, 1);
path = (char *)
sym_get_string_value(sym);
file = (char *)
sym_get_string_value(defFile);
- key = realloc(key, strlen(path)
+ strlen(file) + 2);
- sprintf(key, "%s%c%s", path,
DIR_SEPARATOR, file);
+ pathLen = strlen(path);
+ key = realloc(key, pathLen +
strlen(file) + 2);
+ strcpy(key, path);
+ c = key[pathLen-1];
+ if (c != '\\' && c != '/')
+ strcat(key,
DIR_SEPARATOR_STR);
+ strcat(key, file);
cfg_parse_file(key);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1101 - GNUnet/src/conf,
durner <=