Skip to content

Commit

Permalink
feat: Reset directory modified times as well
Browse files Browse the repository at this point in the history
Fixes #14
  • Loading branch information
Dr-Emann committed Apr 15, 2024
1 parent 17fc763 commit 37847a5
Show file tree
Hide file tree
Showing 6 changed files with 257 additions and 184 deletions.
118 changes: 37 additions & 81 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions crates/applesauce/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ resource-fork = { version = "^0.3.0", path = "../resource-fork" }
applesauce-core = { version = "^0.3.0", path = "../applesauce-core" }

crossbeam-channel = "0.5.12"
ignore = "0.4.22"
libc = "0.2.153"
memchr = "2.7"
oneshot = "0.1.6"
tempfile = "3.10.1"
tracing = "0.1.40"
walkdir = "2.5.0"

jwalk = "0.8"

flate2 = { version = "1.0", optional = true }

Expand All @@ -43,3 +43,4 @@ lzfse-sys = { version = "=1.0.0", optional = true }

[dev-dependencies]
sha2 = "0.10.8"
walkdir = "2.5.0"
5 changes: 2 additions & 3 deletions crates/applesauce/src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use std::os::macos::fs::MetadataExt as _;
use std::os::unix::ffi::OsStrExt;
use std::os::unix::fs::MetadataExt as _;
use std::path::Path;
use walkdir::WalkDir;

pub use applesauce_core::decmpfs::CompressionType;

Expand Down Expand Up @@ -85,13 +84,13 @@ impl AfscFolderInfo {

pub fn get_recursive(path: &Path) -> io::Result<AfscFolderInfo> {
let mut result = AfscFolderInfo::default();
for entry in WalkDir::new(path) {
for entry in jwalk::WalkDir::new(path) {
let entry = entry?;
let file_type = entry.file_type();

#[allow(clippy::filetype_is_file)]
if file_type.is_file() {
let info = get(entry.path())?;
let info = get(&entry.path())?;
result.num_files += 1;
if info.is_compressed {
result.num_compressed_files += 1;
Expand Down
Loading

0 comments on commit 37847a5

Please sign in to comment.