mirror of
https://github.com/xvxx/phd
synced 2024-11-12 07:10:45 +00:00
more / nonsense
This commit is contained in:
parent
a902c0870c
commit
7dca22857f
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user