aboutsummaryrefslogtreecommitdiffstats
path: root/daemon/pathnames.c
diff options
context:
space:
mode:
authoryaworsky <yaworsky>2005-09-16 09:26:26 +0000
committeryaworsky <yaworsky>2005-09-16 09:26:26 +0000
commitf5b4965699765375078f4feee8cd3a5c03d5b6ca (patch)
tree94b189e57250ade074fafa303276276bccf5f85e /daemon/pathnames.c
parentbac9d79a04320f9a0fbe1a7b5d2d8e64ece6fb6c (diff)
downloadsyslog-win32-f5b4965699765375078f4feee8cd3a5c03d5b6ca.tar.gz
syslog-win32-f5b4965699765375078f4feee8cd3a5c03d5b6ca.tar.xz
syslog-win32-f5b4965699765375078f4feee8cd3a5c03d5b6ca.zip
Fixed locale issues.
Diffstat (limited to '')
-rw-r--r--daemon/pathnames.c8
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 )