fix stuff
This commit is contained in:
parent
b089136014
commit
d5f8e127a3
1 changed files with 10 additions and 10 deletions
|
|
@ -44,6 +44,16 @@ pub async fn get_agreement(lang: &str, ip: CFIP) -> io::Result<Ds<RawXml<NamedFi
|
|||
};
|
||||
|
||||
if EVIL_AGREEMENT_THING.read().await.contains(&ip.0) {
|
||||
let path = {
|
||||
let mut path = base_path;
|
||||
|
||||
path.push("EVIL.xml");
|
||||
|
||||
path
|
||||
};
|
||||
|
||||
Ok(Ds(RawXml(NamedFile::open(&path).await?)))
|
||||
} else {
|
||||
let requested_file_path = {
|
||||
let mut path = base_path.clone();
|
||||
|
||||
|
|
@ -66,15 +76,5 @@ pub async fn get_agreement(lang: &str, ip: CFIP) -> io::Result<Ds<RawXml<NamedFi
|
|||
|
||||
Ok(Ds(RawXml(NamedFile::open(&fallback_path).await?)))
|
||||
}
|
||||
} else {
|
||||
let path = {
|
||||
let mut path = base_path;
|
||||
|
||||
path.push("EVIL.xml");
|
||||
|
||||
path
|
||||
};
|
||||
|
||||
Ok(Ds(RawXml(NamedFile::open(&path).await?)))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue