mirror of
https://github.com/eza-community/eza
synced 2024-09-29 20:54:59 +00:00
fix: checking for deref flag in file_name
As per Vosjedev mentionned on #932 dereference (`-X`) was ignored on latest eza version however it was used for file-names. This was due to the usage of the function `with_link_paths` that forced a link printing, whereas the deref flag prevent it. This also adds some debug printing.
This commit is contained in:
parent
a4782d1ddd
commit
8afb5cc285
|
@ -135,6 +135,8 @@ impl<'dir> File<'dir> {
|
|||
RecursiveSize::None
|
||||
};
|
||||
|
||||
debug!("deref_links {}", deref_links);
|
||||
|
||||
let mut file = File {
|
||||
name,
|
||||
ext,
|
||||
|
|
|
@ -328,6 +328,8 @@ impl<'a> Render<'a> {
|
|||
.paint()
|
||||
.promote();
|
||||
|
||||
debug!("file_name {:?}", file_name);
|
||||
|
||||
let row = Row {
|
||||
tree: tree_params,
|
||||
cells: egg.table_row,
|
||||
|
|
|
@ -162,7 +162,9 @@ impl<'a, 'dir, C> FileName<'a, 'dir, C> {
|
|||
/// Sets the flag on this file name to display link targets with an
|
||||
/// arrow followed by their path.
|
||||
pub fn with_link_paths(mut self) -> Self {
|
||||
self.link_style = LinkStyle::FullLinkPaths;
|
||||
if !self.file.deref_links {
|
||||
self.link_style = LinkStyle::FullLinkPaths;
|
||||
}
|
||||
self
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue