1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-31 09:24:31 +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>> { async fn roots(path: Option<&str>, builtin: bool) -> Vec<Result<PathBuf, std::io::Error>> {
let mut paths = Vec::new(); let mut paths = Vec::new();
if builtin && cfg!(feature = "dev") { if builtin && cfg!(feature = "dev") {
paths.push(PathBuf::from(format!( paths.push(
"{}/src/res", Path::new(env!("CARGO_MANIFEST_DIR"))
env!("CARGO_MANIFEST_DIR") .join("src")
))); .join("res"),
);
} }
if let Some(path) = path { if let Some(path) = path {