Fix a crash when --output_dir is used with serve (#1164)

This commit is contained in:
Thomas Etter 2020-09-14 10:36:29 +02:00 committed by Vincent Prouillet
parent d9396213de
commit f7cd28c8d2

View file

@ -547,7 +547,7 @@ impl Site {
p.as_os_str().to_string_lossy().replace("public/", "/")
} else {
// TODO" remove unwrap
let p = current_path.strip_prefix("public").unwrap();
let p = current_path.strip_prefix(&self.output_path).unwrap();
p.as_os_str().to_string_lossy().into_owned()
}
.trim_end_matches('/')