summaryrefslogtreecommitdiff
path: root/src/collect_files.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/collect_files.rs')
-rw-r--r--src/collect_files.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/collect_files.rs b/src/collect_files.rs
index dfcc847..64cfc30 100644
--- a/src/collect_files.rs
+++ b/src/collect_files.rs
@@ -279,7 +279,7 @@ impl Website {
.filter(|s| !s.is_empty() && *s != ".")
.collect();
'outer: loop {
- for i in 0..(segments.len()-1) {
+ for i in 0..(segments.len().saturating_sub(1)) {
if segments[i] == ".." {
if i == 0 {
segments.remove(0);