1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

Use platform-native fs path building

This commit is contained in:
Jonas Platte
2022-05-10 11:07:02 +02:00
committed by Quentin Gliech
parent 1aedabb6c6
commit 2cba5e7ad2

View File

@ -90,10 +90,11 @@ impl Templates {
async fn roots(path: Option<&str>, builtin: bool) -> Vec<Result<PathBuf, std::io::Error>> {
let mut paths = Vec::new();
if builtin && cfg!(feature = "dev") {
paths.push(PathBuf::from(format!(
"{}/src/res",
env!("CARGO_MANIFEST_DIR")
)));
paths.push(
Path::new(env!("CARGO_MANIFEST_DIR"))
.join("src")
.join("res"),
);
}
if let Some(path) = path {