This commit is contained in:
2026-02-05 23:50:59 +08:00
parent 6943ac8ef5
commit 650e92ad5f
3 changed files with 14 additions and 2 deletions

2
Cargo.lock generated
View File

@@ -236,7 +236,7 @@ dependencies = [
[[package]]
name = "l-s"
version = "0.4.0"
version = "0.4.1"
dependencies = [
"anyhow",
"clap",

View File

@@ -1,6 +1,6 @@
[package]
name = "l-s"
version = "0.4.0"
version = "0.4.1"
authors = ["licsber <admin@licsber.site>"]
edition = "2021"

View File

@@ -59,6 +59,10 @@ impl DirSnapshot {
.file_type()
.with_context(|| format!("无法读取类型: {}", full_path.display()))?;
if file_type.is_symlink() {
continue;
}
if file_type.is_dir() {
if should_skip_dir(&name) {
continue;
@@ -141,6 +145,10 @@ fn count_files_recursive(path: &Path, count: &mut u64) -> Result<()> {
.file_type()
.with_context(|| format!("无法读取类型: {}", full_path.display()))?;
if file_type.is_symlink() {
continue;
}
if file_type.is_dir() {
if should_skip_dir(&name) {
continue;
@@ -175,6 +183,10 @@ fn walk_dir_with_progress(
.file_type()
.with_context(|| format!("无法读取类型: {}", full_path.display()))?;
if file_type.is_symlink() {
continue;
}
if file_type.is_dir() {
if should_skip_dir(&name) {
continue;