Skip to content

Commit

Permalink
fixed casing of the magic values (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaMilosa authored Nov 24, 2023
1 parent dfab1cc commit 802ed89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 802ed89

Please sign in to comment.