mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 14:03:42 +02:00
Validate settings before run
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use super::butler_db_parser::*;
|
||||
use super::receipt::Receipt;
|
||||
use super::{ItchGame, ItchSettings};
|
||||
use crate::platform::Platform;
|
||||
use crate::platform::{Platform, SettingsValidity};
|
||||
use failure::*;
|
||||
use flate2::read::GzDecoder;
|
||||
use std::collections::HashSet;
|
||||
@@ -59,6 +59,15 @@ impl Platform<ItchGame, ItchErrors> for ItchPlatform {
|
||||
fn create_symlinks(&self) -> bool {
|
||||
self.settings.create_symlinks
|
||||
}
|
||||
|
||||
fn settings_valid(&self) -> crate::platform::SettingsValidity {
|
||||
let shortcuts_res = self.get_shortcuts();
|
||||
match shortcuts_res {
|
||||
Ok(_) => SettingsValidity::Valid,
|
||||
Err(err) => SettingsValidity::Invalid{reason:format!("{}",err)}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fn dbpath_to_game(paths: &DbPaths<'_>) -> Option<ItchGame> {
|
||||
|
||||
Reference in New Issue
Block a user