mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-20 11:47:46 +00:00
Don't call unwrap() in BootData
This commit is contained in:
parent
51e8749b2d
commit
611f048e94
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ impl BootData {
|
||||||
pub fn from_existing(directory: &str) -> Option<BootData> {
|
pub fn from_existing(directory: &str) -> Option<BootData> {
|
||||||
match Self::is_valid(directory) {
|
match Self::is_valid(directory) {
|
||||||
true => Some(BootData {
|
true => Some(BootData {
|
||||||
path: directory.parse().unwrap(),
|
path: directory.parse().ok()?,
|
||||||
version: fs::read_to_string(format!("{directory}/ffxivboot.ver")).unwrap(),
|
version: fs::read_to_string(format!("{directory}/ffxivboot.ver")).ok()?,
|
||||||
}),
|
}),
|
||||||
false => {
|
false => {
|
||||||
warn!("Boot data is not valid!");
|
warn!("Boot data is not valid!");
|
||||||
|
|
Loading…
Add table
Reference in a new issue