From fc0f5df6483503c49c4794b9fff425c835e62a59 Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
Date: Sun, 2 Sep 2007 04:29:08 +0000
Subject: [PATCH] Sync with HEAD - only use libfetch for non-FILE URLs

---
 libraries/liblutil/fetch.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libraries/liblutil/fetch.c b/libraries/liblutil/fetch.c
index 6535dd20b6..104aa45179 100644
--- a/libraries/liblutil/fetch.c
+++ b/libraries/liblutil/fetch.c
@@ -43,10 +43,7 @@ ldif_open_url(
 	LDAP_CONST char *urlstr )
 {
 	FILE *url;
-#ifdef HAVE_FETCH
-	url = fetchGetURL( (char*) urlstr, "" );
 
-#else
 	if( strncasecmp( "file:", urlstr, sizeof("file:")-1 ) == 0 ) {
 		char *p;
 		urlstr += sizeof("file:")-1;
@@ -66,9 +63,12 @@ ldif_open_url(
 
 		ber_memfree( p );
 	} else {
-		return NULL;
-	}
+#ifdef HAVE_FETCH
+		url = fetchGetURL( (char*) urlstr, "" );
+#else
+		url = NULL;
 #endif
+	}
 	return url;
 }
 
-- 
GitLab