1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-05-10 04:17:46 +00:00

Early exit in GameData::parse_repository_category if no repositories are available

This commit is contained in:
Joshua Goins 2025-05-05 17:19:39 -04:00
parent 270eee992b
commit 62b13f557a

View file

@ -202,6 +202,10 @@ impl GameData {
/// Parses a path structure and spits out the corresponding category and repository.
fn parse_repository_category(&self, path: &str) -> Option<(&Repository, Category)> {
if self.repositories.is_empty() {
return None
}
let tokens = path.split_once('/')?;
let repository_token = tokens.1;