mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-20 03:37:47 +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> {
|
||||
match Self::is_valid(directory) {
|
||||
true => Some(BootData {
|
||||
path: directory.parse().unwrap(),
|
||||
version: fs::read_to_string(format!("{directory}/ffxivboot.ver")).unwrap(),
|
||||
path: directory.parse().ok()?,
|
||||
version: fs::read_to_string(format!("{directory}/ffxivboot.ver")).ok()?,
|
||||
}),
|
||||
false => {
|
||||
warn!("Boot data is not valid!");
|
||||
|
|
Loading…
Add table
Reference in a new issue