Skip to content
Myr

Make --changed-within/before work for directories

Before adoption: this commit came in with the history the project adopted, so no landing records it.

closes #470

authored by sharkdp · committed by David Peter · parent 50fca2d · Browse files · 1 file+6 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−8 removed

  • other:+6 added−8 removed

1 file+6 added−8 removed

modified:src/walk.rs+6 added-8 removed
363 unmodified lines
364365 // Filter out unwanted modification times366 if !config.time_constraints.is_empty() {367 let mut matched = false;368 if entry_path.is_file() {369 if let Ok(metadata) = entry_path.metadata() {370 if let Ok(modified) = metadata.modified() {371 matched = config372 .time_constraints373 .iter()374 .all(|tf| tf.applies_to(&modified));368 if let Ok(metadata) = entry_path.metadata() {369 if let Ok(modified) = metadata.modified() {370 matched = config371 .time_constraints372 .iter()373 .all(|tf| tf.applies_to(&modified));375 }374 }375 }376 if !matched {377 return ignore::WalkState::Continue;
12 unmodified lines