2
0
mirror of https://github.com/xvxx/phd synced 2024-11-12 07:10:45 +00:00

more / nonsense

This commit is contained in:
dvkt 2019-12-27 20:12:10 -08:00
parent a902c0870c
commit 7dca22857f

View File

@ -35,6 +35,9 @@ impl Request {
/// Path to the target file on disk requested by this request.
pub fn file_path(&self) -> String {
let mut path = self.root.to_string();
if !path.ends_with('/') {
path.push('/');
}
path.push_str(self.selector.replace("..", ".").trim_start_matches('/'));
path
}