This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
vpzom
/
crepo
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Ignore a single trailing slash
master
Colin Reeder
2 years ago
parent
d9dfa4b544
commit
b03d44d39c
1 changed files
with
3 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
src/main.rs
+ 3
- 0
src/main.rs
View File
@@ -125,6 +125,9 @@ fn main() {
if path.len() > 0 && path.starts_with("/") {
path = &path[1..];
}
if path.ends_with("/") {
path = &path[..(path.len() - 1)];
}
let path = path;
if path.len() == 0 {
Write
Preview
Loading…
Cancel
Save