From 3deb8ef703268b71833350c2b2cb7c98c6b4c6a9 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Sun, 2 Dec 2007 02:54:33 +0000 Subject: [PATCH] Fix dirsep chars before opening file part of windows fixes already committed. --- libraries/liblutil/fetch.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/liblutil/fetch.c b/libraries/liblutil/fetch.c index 104aa45179..9ddc82dd35 100644 --- a/libraries/liblutil/fetch.c +++ b/libraries/liblutil/fetch.c @@ -57,6 +57,14 @@ ldif_open_url( } p = ber_strdup( urlstr ); + + /* But we should convert to LDAP_DIRSEP before use */ + if ( LDAP_DIRSEP[0] != '/' ) { + char *s = p; + while (( s = strchr( s, '/' ))) + *s++ = LDAP_DIRSEP[0]; + } + ldap_pvt_hex_unescape( p ); url = fopen( p, "rb" ); -- 2.39.5