fix
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -236,7 +236,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "l-s"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "l-s"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
authors = ["licsber <admin@licsber.site>"]
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user