aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2022-07-30 18:57:15 +0200
committerMartin Fischer <martin@push-f.com>2022-07-30 18:58:08 +0200
commita920436c3af249266ff907d15755c1291737905a (patch)
treeb733e5c0a09da0479b64d0a1f9d3d1dc9f7cc0e9
parent3dc92796c8674b9e8a1370797723ef1c327085b6 (diff)
fix SoloController::build_url_path
-rw-r--r--src/controller.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controller.rs b/src/controller.rs
index 7a4a44a..90d2d26 100644
--- a/src/controller.rs
+++ b/src/controller.rs
@@ -27,7 +27,7 @@ pub trait Controller {
repo: &Repository,
) -> Result<(Branch, &'a str), Result<Response, Error>>;
- /// Builds a URL path from a given Git branch and file path.
+ /// Builds an absolute URL path from a given Git branch and file path.
fn build_url_path<'a>(&self, branch: &Branch, path: &'a str) -> String;
/// Returns some HTML info to display for the current page.
@@ -111,7 +111,7 @@ impl Controller for SoloController {
}
fn build_url_path<'a>(&self, branch: &Branch, path: &'a str) -> String {
- path.to_owned()
+ format!("/{}", path)
}
fn signature(&self, repo: &Repository, parts: &Parts) -> Result<Signature, Error> {