Fix a crash when --output_dir is used with serve (#1164)
This commit is contained in:
parent
d9396213de
commit
f7cd28c8d2
|
@ -547,7 +547,7 @@ impl Site {
|
||||||
p.as_os_str().to_string_lossy().replace("public/", "/")
|
p.as_os_str().to_string_lossy().replace("public/", "/")
|
||||||
} else {
|
} else {
|
||||||
// TODO" remove unwrap
|
// 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()
|
p.as_os_str().to_string_lossy().into_owned()
|
||||||
}
|
}
|
||||||
.trim_end_matches('/')
|
.trim_end_matches('/')
|
||||||
|
|
Loading…
Reference in a new issue