[Lunar-commits] <lunar> #417: Fixed bug where slash was missing in lvu urls output

root ratler at lunar-linux.org
Sat Mar 20 07:36:24 CET 2010


commit 674867e5e793b2b8c79e6c3fb2896107d85bef1c
Author: root <ratler at lunar-linux.org>
Date:   Sat Mar 20 07:36:24 2010 +0100

    #417: Fixed bug where slash was missing in lvu urls output
---
 bin/lvu |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/bin/lvu b/bin/lvu
index cccfae7..3dd476c 100755
--- a/bin/lvu
+++ b/bin/lvu
@@ -686,7 +686,14 @@ show_eert() {
 show_urls() { (
   # function overrides:
   plugin_call() { return 0 ; }
-  download_url() { echo $1$2 ; return 1 ; }
+  download_url() { 
+    URL=$1
+    if [ "${URL#${URL%?}}" != "/" ]; then
+      URL="${URL}/"
+    fi
+    echo $URL$2
+    return 1
+  }
   connect() { return 0 ; }
 
   LRESORT_URL=


More information about the Lunar-commits mailing list