diff options
author | yaworsky <yaworsky> | 2005-09-16 09:26:26 +0000 |
---|---|---|
committer | yaworsky <yaworsky> | 2005-09-16 09:26:26 +0000 |
commit | f5b4965699765375078f4feee8cd3a5c03d5b6ca (patch) | |
tree | 94b189e57250ade074fafa303276276bccf5f85e /daemon/pathnames.c | |
parent | bac9d79a04320f9a0fbe1a7b5d2d8e64ece6fb6c (diff) | |
download | syslog-win32-f5b4965699765375078f4feee8cd3a5c03d5b6ca.tar.gz syslog-win32-f5b4965699765375078f4feee8cd3a5c03d5b6ca.tar.xz syslog-win32-f5b4965699765375078f4feee8cd3a5c03d5b6ca.zip |
Fixed locale issues.
Diffstat (limited to '')
-rw-r--r-- | daemon/pathnames.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/daemon/pathnames.c b/daemon/pathnames.c index 932c854..8d4b09a 100644 --- a/daemon/pathnames.c +++ b/daemon/pathnames.c @@ -81,14 +81,16 @@ void create_directories( gchar* pathname ) * normalize_pathname * * Remove . and .. from pathname. - * Return NULL if pathname is invalid. + * Pathname should be in UTF-8 encoding. + * Return NULL if pathname is invalid or normalized pathname + * in locale encoding. */ gchar* normalize_pathname( const gchar* pathname ) { - gchar *ret = g_strdup( pathname ); + gchar *ret = g_locale_from_utf8( pathname, -1, NULL, NULL, NULL ); gchar *first_element, *current_element, *next_element; - TRACE_ENTER( "%s\n", pathname ); + TRACE_ENTER( "%s\n", ret ); first_element = (gchar*) g_path_skip_root( ret ); if( !first_element ) |