]> git.plutz.net Git - busy/commitdiff
prevent endless loop on malformed svn path
authorpaul <paul@plutz.net>
Fri, 28 Feb 2014 23:54:53 +0000 (23:54 +0000)
committerpaul <paul@plutz.net>
Fri, 28 Feb 2014 23:54:53 +0000 (23:54 +0000)
svn path=/trunk/; revision=53

Subversion.page

index 2d8d794ffb60f0991e5fc3eb5ef796224b3f3cea..93b55293c63a7f11bb3daa9515eb2243072daefa 100755 (executable)
@@ -11,10 +11,10 @@ cat <<SVNEND
   <div id="LEFT">
     <h1>Path:</h1>
     <a href='?p=Subversion&amp;i=/&amp;r=$rev'>[root]</a> 
-    $(tmp=$url
-    until [ -z "$tmp" -o "$tmp" = // ]; do
+    $(tmp="$url"
+    until [ -z "$tmp" -o "$tmp" = '//' -o "$tmp" = './' ]; do
       echo "<a href='?p=Subversion&amp;i=$tmp&amp;r=$rev'>/$(basename "$tmp")</a> "
-      tmp=$(dirname "$tmp")/
+      tmp="$(dirname "$tmp")/"
     done |tac)
     <hr>
     <h1>Revisions:</h1>