mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
fix: retrieve metadata for symbolic links without following them
Previously, the function get_metadata in platform.rs used `fs::metadata` which follows symbolic links and returns metadata for the target file. This caused issues #421: du / dust disagreement when trying to determine properties of the symbolic link itself
This commit is contained in:
+1
-1
@@ -228,7 +228,7 @@ fn main() {
|
||||
let follow_links = options.get_flag("dereference_links");
|
||||
|
||||
let allowed_filesystems = limit_filesystem
|
||||
.then(|| get_filesystem_devices(&target_dirs))
|
||||
.then(|| get_filesystem_devices(&target_dirs, follow_links))
|
||||
.unwrap_or_default();
|
||||
let simplified_dirs = simplify_dir_names(&target_dirs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user