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

Check if boot version file exists before reading it

This commit is contained in:
Joshua Goins 2025-05-05 17:15:16 -04:00
parent ceeb56fabe
commit 270eee992b

View file

@ -51,8 +51,15 @@ impl BootData {
}
fn is_valid(path: &str) -> bool {
let d = PathBuf::from(path);
let mut d = PathBuf::from(path);
// Check if directory exists
if fs::metadata(d.as_path()).is_err() {
return false;
}
// Check if it has a version file
d.push("ffxivboot.ver");
if fs::metadata(d.as_path()).is_err() {
return false;
}