[Lunar-commits] r19509 - lunar/trunk/var/lib/lunar/functions

Auke Kok sofar at lunar-linux.org
Wed Mar 29 02:13:06 UTC 2006


Author: sofar
Date: 2006-03-29 02:13:01 +0000 (Wed, 29 Mar 2006)
New Revision: 19509

Modified:
   lunar/trunk/var/lib/lunar/functions/download.lunar
Log:
Bugfix for #74 - remove any double backslash at the end of an URL before continuing.


Modified: lunar/trunk/var/lib/lunar/functions/download.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/download.lunar	2006-03-28 18:37:28 UTC (rev 19508)
+++ lunar/trunk/var/lib/lunar/functions/download.lunar	2006-03-29 02:13:01 UTC (rev 19509)
@@ -34,7 +34,7 @@
 
 
 download_url() {
-    local RETVAL
+	local RETVAL
 	debug_msg "download_url($@)"
 	verbose_msg "trying to download \"$1/$2\""
 	connect &&
@@ -92,7 +92,7 @@
 			if [ -n "$1" ]; then
 				if ! echo " $ALL_URLS " | grep -q " $1 "; then
 					# make sure the URL has ONE "/" at the end
-					ALL_URLS="$ALL_URLS $(echo "$1/" | sed "s:[/][/]$:/:g")"
+					ALL_URLS="$ALL_URLS $(echo "$1/" | sed "s:[/]*$:/:g")"
 				fi
 			fi
 		}
@@ -129,7 +129,7 @@
 					fi
 				done
 				add_url $LRESORT_URL
-		    fi
+			fi
 
 			for URL in $ALL_URLS; do
 				# and download



More information about the Lunar-commits mailing list