Added smarter handling of trailing slash in the source view.

This commit is contained in:
Loic d'Anterroches 2009-02-16 21:33:19 +01:00
parent ea55f9f793
commit 37f94d8581

View File

@ -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);