From 802ed89d58ce87fb7ebf49e28f004ca6c7bed84f Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic <73236646+NikolaMilosa@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:52:25 +0100 Subject: [PATCH] fixed casing of the magic values (#29) --- src/util.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util.rs b/src/util.rs index dfd7fea..4be20fd 100644 --- a/src/util.rs +++ b/src/util.rs @@ -43,15 +43,15 @@ where file.read_exact(&mut boot_sector)?; - if &boot_sector[3..7] == b"Ntfs" { + if &boot_sector[3..7] == b"NTFS" { return Ok(FileSystems::Ntfs(NtfsBootSector::from_bytes(&boot_sector)?)); } - if &boot_sector[36..39] == b"Fat" { + if &boot_sector[36..39] == b"FAT" { return Ok(FileSystems::Fat); } - if &boot_sector[0..2] == b"H+" || &boot_sector[0..4] == b"HfsJ" || &boot_sector[0..4] == b"Hfs+" + if &boot_sector[0..2] == b"H+" || &boot_sector[0..4] == b"HFSJ" || &boot_sector[0..4] == b"HFS+" { return Ok(FileSystems::Hfs); }