Skip to content

Commit 345694d

Browse files
committed
Fix persistent "VM image update pending" for users without FreeBSD
The reinit check flagged a pending update when no FreeBSD image was installed, since it treated the absence of a freebsd* directory as a missing install. Now it only flags a mismatch when the user has actually installed a FreeBSD image.
1 parent 6d27601 commit 345694d

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src-tauri/src/commands/status.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ fn check_reinit_pending() -> bool {
5959
}
6060

6161
// Check freebsd: directory is freebsd-15.0 etc., so scan for freebsd* dirs
62+
// Only flag reinit if the user has actually installed a FreeBSD image
6263
let freebsd_desired = prefix.join("share/freebsd/rootfs.ver");
6364
if freebsd_desired.exists() {
6465
if let Ok(entries) = std::fs::read_dir(&anylinuxfs_dir) {
65-
let mut found_installed = false;
6666
for entry in entries.flatten() {
6767
let name = entry.file_name();
6868
let name_str = name.to_string_lossy();
@@ -71,13 +71,8 @@ fn check_reinit_pending() -> bool {
7171
if version_mismatch(&freebsd_desired, &installed_ver) {
7272
return true;
7373
}
74-
found_installed = true;
7574
}
7675
}
77-
// Desired version exists but no installed freebsd directory found
78-
if !found_installed {
79-
return true;
80-
}
8176
}
8277
}
8378

0 commit comments

Comments
 (0)