]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/fetch.c
cleanup
[openldap] / libraries / liblutil / fetch.c
index 5ed0ad9cb094b35aa7b26cece71d76b39ec20d5c..661bc1e75b164b45cc9be39466a2d942ca1a2fe8 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2005 The OpenLDAP Foundation.
+ * Copyright 1999-2006 The OpenLDAP Foundation.
  * Portions Copyright 1999-2003 Kurt D. Zeilenga.
  * All rights reserved.
  *
@@ -40,8 +40,7 @@
 
 FILE *
 ldif_open_url(
-       LDAP_CONST char *urlstr
-)
+       LDAP_CONST char *urlstr )
 {
        FILE *url;
        char *p = NULL;
@@ -56,7 +55,7 @@ ldif_open_url(
                }
 
                /* we don't check for LDAP_DIRSEP since URLs should contain '/' */
-               if( *p != '/' ) {
+               if( p[1] == '.' && ( p[2] == '/' || ( p[2] == '.' && p[3] == '/' ))) {
                        /* skip over false root */
                        p++;
                }
@@ -78,8 +77,7 @@ int
 ldif_fetch_url(
     LDAP_CONST char    *urlstr,
     char       **valuep,
-    ber_len_t *vlenp
-)
+    ber_len_t *vlenp )
 {
        FILE *url;
        char buffer[1024];