From 37f94d8581a0ec47a13f20e9b76b28dafabc7a13 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Mon, 16 Feb 2009 21:33:19 +0100 Subject: [PATCH] Added smarter handling of trailing slash in the source view. --- src/IDF/Views/Source.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IDF/Views/Source.php b/src/IDF/Views/Source.php index 409cbdd..dade5bc 100644 --- a/src/IDF/Views/Source.php +++ b/src/IDF/Views/Source.php @@ -157,6 +157,9 @@ class IDF_Views_Source $fburl = Pluf_HTTP_URL_urlForView('IDF_Views_Source::treeBase', array($request->project->shortname, $branches[0])); + if (substr($request_file, -1) == '/') { + $request_file = substr($request_file, 0, -1); + } if ('commit' != $scm->testHash($commit, $request_file)) { // Redirect to the first branch return new Pluf_HTTP_Response_Redirect($fburl);