diff --git a/Cargo.lock b/Cargo.lock index f45bf0a..e8a9cef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -481,8 +481,7 @@ dependencies = [ [[package]] name = "exfat-fs" version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbdfa8ecf36ab2341032974d3644a56f1e40c9da3b643118492cf97f357f3c5" +source = "git+https://github.com/jujuforce/exfat-fs.git?rev=7067f6afe3c21d9c737288475b29e5dae790e206#7067f6afe3c21d9c737288475b29e5dae790e206" dependencies = [ "bitflags", "bytemuck", diff --git a/Cargo.toml b/Cargo.toml index 0ffb8e9..4b4ff39 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,3 +21,13 @@ cipher = { version = "0.4.4", features = ["alloc"] } lto = "thin" codegen-units = 1 strip = "none" + +# exfat-fs 0.1.3 rejects empty (zero-length) files/dirs: its +# StreamExtensionEntry::valid() treats FirstCluster < 2 as invalid, but an +# empty file legitimately has FirstCluster = 0 / DataLength = 0. That aborts +# the whole extraction the moment an OPTION container contains any 0-byte file. +# Until the fix lands in a published release, override with a fork branch that +# is the 0.1.3 release plus only that one-function fix (identical public API). +# See https://github.com/jujuforce/exfat-fs/tree/v0.1.3-empty-file-fix +[patch.crates-io] +exfat-fs = { git = "https://github.com/jujuforce/exfat-fs.git", rev = "7067f6afe3c21d9c737288475b29e5dae790e206" } diff --git a/fixtures/TEST_T001_20240101120000_0.opt b/fixtures/TEST_T001_20240101120000_0.opt index 456096f..ae139e9 100644 Binary files a/fixtures/TEST_T001_20240101120000_0.opt and b/fixtures/TEST_T001_20240101120000_0.opt differ