Skip to content

Commit

Permalink
Fix FileVault being displayed as unknown when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
F1248 committed Dec 30, 2024
1 parent c98d715 commit da4ff29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Genius/Extensions/Swift/Bool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ extension Bool: DataInitializable {
guard let string = (string as? String)?.lowercased() else { return nil }
if string.contains(any: [
"no",
"off",
"false",
"disabled",
]) {
self = false
} else if string.contains(any: [
"yes",
"on",
"true",
"enabled",
]) {
Expand Down
2 changes: 1 addition & 1 deletion Genius/Models/SystemInformation/MaintenanceChecks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extension SystemInformation {
enum DataSecurity {

static let fileVault = SystemInformationData<Bool?>(
{ Bool(Process("/usr/bin/fdesetup", ["isactive"])?.runSafe()) },
{ Bool(Process("/usr/bin/fdesetup", ["status"])?.runSafe()) },
applicable: Software.OS.bootMode.value !=? .recovery
)
}
Expand Down

0 comments on commit da4ff29

Please sign in to comment.