Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/labrinth/src/routes/maven.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@
fn find_file<'a>(
project_id: &str,
vcoords: &str,
version: &'a VersionQueryResult,

Check warning on line 241 in apps/labrinth/src/routes/maven.rs

View workflow job for this annotation

GitHub Actions / Lint and Test

Diff in /home/runner/work/code/code/apps/labrinth/src/routes/maven.rs
file: &str,
) -> Option<&'a FileQueryResult> {
if let Some(selected_file) =
version.files.iter().find(|x| x.filename == file)
version.files.iter().find(|x| x.filename.eq_ignore_ascii_case(file))
{
return Some(selected_file);
}
Expand All @@ -256,10 +256,10 @@
"modpack" => fileexts.push("mrpack"),
_ => (),
}
}

Check warning on line 259 in apps/labrinth/src/routes/maven.rs

View workflow job for this annotation

GitHub Actions / Lint and Test

Diff in /home/runner/work/code/code/apps/labrinth/src/routes/maven.rs

for fileext in fileexts {
if file == format!("{}-{}.{}", &project_id, &vcoords, fileext) {
if file.eq_ignore_ascii_case(&format!("{}-{}.{}", &project_id, &vcoords, fileext)) {
return version
.files
.iter()
Expand Down Expand Up @@ -313,7 +313,7 @@
return Err(ApiError::NotFound);
}

if file == format!("{}-{}.pom", &project_id, &vnum) {
if file.eq_ignore_ascii_case(&format!("{}-{}.pom", &project_id, &vnum)) {
let respdata = MavenPom {
schema_location:
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
Expand Down
Loading