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:
parent
270eee992b
commit
62b13f557a
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue