fix
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -236,7 +236,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "l-s"
|
name = "l-s"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "l-s"
|
name = "l-s"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
authors = ["licsber <admin@licsber.site>"]
|
authors = ["licsber <admin@licsber.site>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,10 @@ impl DirSnapshot {
|
|||||||
.file_type()
|
.file_type()
|
||||||
.with_context(|| format!("无法读取类型: {}", full_path.display()))?;
|
.with_context(|| format!("无法读取类型: {}", full_path.display()))?;
|
||||||
|
|
||||||
|
if file_type.is_symlink() {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if file_type.is_dir() {
|
if file_type.is_dir() {
|
||||||
if should_skip_dir(&name) {
|
if should_skip_dir(&name) {
|
||||||
continue;
|
continue;
|
||||||
@@ -141,6 +145,10 @@ fn count_files_recursive(path: &Path, count: &mut u64) -> Result<()> {
|
|||||||
.file_type()
|
.file_type()
|
||||||
.with_context(|| format!("无法读取类型: {}", full_path.display()))?;
|
.with_context(|| format!("无法读取类型: {}", full_path.display()))?;
|
||||||
|
|
||||||
|
if file_type.is_symlink() {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if file_type.is_dir() {
|
if file_type.is_dir() {
|
||||||
if should_skip_dir(&name) {
|
if should_skip_dir(&name) {
|
||||||
continue;
|
continue;
|
||||||
@@ -175,6 +183,10 @@ fn walk_dir_with_progress(
|
|||||||
.file_type()
|
.file_type()
|
||||||
.with_context(|| format!("无法读取类型: {}", full_path.display()))?;
|
.with_context(|| format!("无法读取类型: {}", full_path.display()))?;
|
||||||
|
|
||||||
|
if file_type.is_symlink() {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if file_type.is_dir() {
|
if file_type.is_dir() {
|
||||||
if should_skip_dir(&name) {
|
if should_skip_dir(&name) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user