diff options
author | Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com> | 2021-04-05 20:21:26 +0000 |
---|---|---|
committer | Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com> | 2021-04-05 20:21:26 +0000 |
commit | 97f5772ca5b1d23ef623a0aea7a5a7f84b9345f1 (patch) | |
tree | c6d90c34e974f2009b11cf791161ca1b663c18fe | |
parent | Test for symlink directories and files (diff) | |
download | miniserve-97f5772ca5b1d23ef623a0aea7a5a7f84b9345f1.tar.gz miniserve-97f5772ca5b1d23ef623a0aea7a5a7f84b9345f1.zip |
Honor --no-symlinks option when listing
-rw-r--r-- | src/listing.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/listing.rs b/src/listing.rs index c5eefe6..53d7233 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -262,7 +262,7 @@ pub fn directory_listing( // if file is a directory, add '/' to the end of the name if let Ok(metadata) = std::fs::metadata(entry.path()) { - if skip_symlinks && metadata.file_type().is_symlink() { + if skip_symlinks && is_symlink { continue; } let last_modification_date = match metadata.modified() { |