Merge pull request #11 from firejoust/path

fallback to major version
pull/12/head
Julius Riegel 2 years ago committed by GitHub
commit 41b3c904e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -68,6 +68,12 @@ pub fn get_path(version: &Version, filename: &str) -> DataResult<String> {
PATHS
.pc
.get(&version.minecraft_version)
// fallback to major version
.or_else(||
PATHS
.pc
.get(&version.major_version)
)
.ok_or_else(|| DataError::NotFoundError(version.minecraft_version.clone()))?
.get(filename)
.cloned()

Loading…
Cancel
Save