From 7934d3c7d6cf93150231ca9e32280b5d342cfa35 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 2 Jul 2006 08:53:33 +0200 Subject: [PATCH] STRING_DIR_SEP in config/* --- src/config/conf.c | 6 +++--- src/config/home.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config/conf.c b/src/config/conf.c index b0ce85615..7feea1c87 100644 --- a/src/config/conf.c +++ b/src/config/conf.c @@ -500,13 +500,13 @@ load_config_file(unsigned char *prefix, unsigned char *name, { unsigned char *config_str, *config_file; - config_file = straconcat(prefix, "/", name, NULL); + config_file = straconcat(prefix, STRING_DIR_SEP, name, NULL); if (!config_file) return 1; config_str = read_config_file(config_file); if (!config_str) { mem_free(config_file); - config_file = straconcat(prefix, "/.", name, NULL); + config_file = straconcat(prefix, STRING_DIR_SEP, ".", name, NULL); if (!config_file) return 2; config_str = read_config_file(config_file); @@ -796,7 +796,7 @@ write_config_file(unsigned char *prefix, unsigned char *name, int prefixlen = strlen(prefix); int prefix_has_slash = (prefixlen && dir_sep(prefix[prefixlen - 1])); int name_has_slash = dir_sep(name[0]); - unsigned char *slash = name_has_slash || prefix_has_slash ? "" : "/"; + unsigned char *slash = name_has_slash || prefix_has_slash ? "" : STRING_DIR_SEP; if (!cfg_str) return -1; diff --git a/src/config/home.c b/src/config/home.c index 1b63e3173..9e23afa97 100644 --- a/src/config/home.c +++ b/src/config/home.c @@ -49,7 +49,7 @@ test_confdir(unsigned char *home, unsigned char *path, if (!path || !*path) return NULL; if (home && *home && !dir_sep(*path)) - confdir = straconcat(home, "/", path, NULL); + confdir = straconcat(home, STRING_DIR_SEP, path, NULL); else confdir = stracpy(path); @@ -134,7 +134,7 @@ get_home(void) end: if (home_elinks) - add_to_strn(&home_elinks, "/"); + add_to_strn(&home_elinks, STRING_DIR_SEP); mem_free_if(home); return home_elinks;