Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden junctions and symlinks #2460

Open
3 tasks done
selfdocumentingcode opened this issue Mar 9, 2025 · 1 comment
Open
3 tasks done

Hidden junctions and symlinks #2460

selfdocumentingcode opened this issue Mar 9, 2025 · 1 comment
Labels
bug Something isn't working needs info

Comments

@selfdocumentingcode
Copy link

selfdocumentingcode commented Mar 9, 2025

What system are you running Yazi on?

Windows 10 Pro 22H2 19045.5487

What terminal are you running Yazi in?

wezterm 20240203-110809-5046fc22 using PowerShell 7.5.0 (happens in any terminal)

yazi --debug output

Yazi
    Version: 25.3.7 (31177fd 2025-03-08)
    Debug  : false
    Triple : x86_64-pc-windows-msvc (windows-x86_64)
    Rustc  : 1.85.0 (4d91de4e 2025-02-17)

Ya
    Version: 25.3.7 (31177fd 2025-03-08)

Emulator
    TERM                : Some("xterm-256color")
    TERM_PROGRAM        : Some("WezTerm")
    TERM_PROGRAM_VERSION: Some("20240203-110809-5046fc22")
    Brand.from_env      : Some(WezTerm)
    Emulator.detect     : Emulator { kind: Left(WezTerm), light: false, cell_size: None }

Adapter
    Adapter.matches: Iip

Desktop
    XDG_SESSION_TYPE           : None
    WAYLAND_DISPLAY            : None
    DISPLAY                    : None
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL           : Some("pwsh")
    EDITOR          : Some("vim")
    VISUAL          : Some("vim")
    YAZI_FILE_ONE   : Some("C:\\Program Files\\Git\\usr\\bin\\file.exe")
    YAZI_CONFIG_HOME: None
    YAZI_ZOXIDE_OPTS: None
    FZF_DEFAULT_OPTS: Some("--walker file,follow,hidden")

Text Opener
    default     : Some(Opener { run: "code %*", block: false, orphan: true, desc: "code", for_: None, spread: true })
    block-create: Some(Opener { run: "code -w %*", block: true, orphan: false, desc: "code (block)", for_: None, spread: true })
    block-rename: Some(Opener { run: "code -w %*", block: true, orphan: false, desc: "code (block)", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : program not found
    tmux build flags   : enable-sixel=Unknown
    ZELLIJ_SESSION_NAME: None
    Zellij version     : program not found

Dependencies
    file          : 5.46
    ueberzugpp    : program not found
    ffmpeg/ffprobe: 7.1 / 7.1
    pdftoppm      : 24.08.0
    magick        : 7.1.1-44
    fzf           : 0.60.3
    fd/fdfind     : 10.2.0 / program not found
    rg            : 14.1.1
    chafa         : program not found
    zoxide        : 0.9.7
    7zz/7z        : program not found / 24.09
    jq            : 1.7.1

Clipboard
    wl-copy/paste: program not found / program not found
    xclip        : program not found
    xsel         : program not found


See https://yazi-rs.github.io/docs/plugins/overview#debugging on how to enable logging or debug runtime errors.

Describe the bug

Since, there is now way to navigate to a different drive in yazi (as far as I know), I tried to set up a symbolic link in the root of my C: drive to point to the D: drive.

Yazi has an unexpected way of choosing which of the hidden symbolic links to actually hide, depending on what their targets are.

Here's an example of some junctions and symbolic links I currently have on my C: drive.

get-childitem . -force | select-object name, attributes, linktype, linktarget

Name                                                                         Attributes LinkType     LinkTarget
----                                                                         ---------- --------     ----------
$Recycle.Bin                                                  Hidden, System, Directory
D-Junction                                                      Directory, ReparsePoint Junction     D:\
D-Junction-Hidden                                       Hidden, Directory, ReparsePoint Junction     D:\
D-Junction-Hidden-System                        Hidden, System, Directory, ReparsePoint Junction     D:\
D-SymbolicLink                                                  Directory, ReparsePoint SymbolicLink D:\
D-SymbolicLink-Hidden                                   Hidden, Directory, ReparsePoint SymbolicLink D:\
Documents and Settings       Hidden, System, Directory, ReparsePoint, NotContentIndexed Junction     C:\Users
Program Files                                                                 Directory
ProgramData                                        Hidden, Directory, NotContentIndexed
Recovery                                   Hidden, System, Directory, NotContentIndexed
System Volume Information                                     Hidden, System, Directory
Users                                                               ReadOnly, Directory
Users-Junction                                                  Directory, ReparsePoint Junction     C:\Users
Users-Junction-Hidden                                   Hidden, Directory, ReparsePoint Junction     C:\Users
Users-Junction-Hidden-System                    Hidden, System, Directory, ReparsePoint Junction     C:\Users
Users-SymbolicLink                                              Directory, ReparsePoint SymbolicLink C:\Users
Users-SymbolicLink-Hidden                               Hidden, Directory, ReparsePoint SymbolicLink C:\Users
Windows                                                                       Directory
swapfile.sys                                                    Hidden, System, Archive

Files I expect yazi to list when "hidden" is off:

Name                              Attributes LinkType     LinkTarget
----                              ---------- --------     ----------
D-Junction           Directory, ReparsePoint Junction     D:\
D-SymbolicLink       Directory, ReparsePoint SymbolicLink D:\
Program Files                      Directory
Users                    ReadOnly, Directory
Users-Junction       Directory, ReparsePoint Junction     C:\Users
Users-SymbolicLink   Directory, ReparsePoint SymbolicLink C:\Users
Windows                            Directory

Files yazi actually lists when "hidden" is off:

Name                                                                         Attributes LinkType     LinkTarget
----                                                                         ---------- --------     ----------
Documents and Settings       Hidden, System, Directory, ReparsePoint, NotContentIndexed Junction     C:\Users
Program Files                                                                 Directory
Users                                                               ReadOnly, Directory
Users-Junction                                                  Directory, ReparsePoint Junction     C:\Users
Users-Junction-Hidden                                   Hidden, Directory, ReparsePoint Junction     C:\Users
Users-Junction-Hidden-System                    Hidden, System, Directory, ReparsePoint Junction     C:\Users
Users-SymbolicLink                                              Directory, ReparsePoint SymbolicLink C:\Users
Users-SymbolicLink-Hidden                               Hidden, Directory, ReparsePoint SymbolicLink C:\Users
Windows                                                                       Directory

The non-hidden D junctions are not visible, while the hidden Users junctions are visible.

Minimal reproducer

Create a Junction or Symbolic link:

New-Item -ItemType Junction -Path "C:\my-junction" -Target "D:\"
New-Item -ItemType SymbolicLink -Path "C:\my-symlink" -Target "C:\Users"

Make file/link hidden:

$f = Get-Item my-junction; 
$f.attributes = $f.attributes -bor ([System.IO.FileAttributes]::Hidden)

List files with attributes and link type information:

# all files
Get-ChildItem C: -Force | Select-Object Name, Attributes, LinkType, LinkTarget

# normal listing
Get-ChildItem C: | Select-Object Name, Attributes, LinkType, LinkTarget

Compare with yazi.

Anything else?

No response

Checklist

  • I tried the latest nightly build, and the issue is still reproducible
  • I updated the debug information (yazi --debug) input box to the nightly that I tried
  • I can reproduce it after disabling all custom configs/plugins (mv ~/.config/yazi ~/.config/yazi-backup)
@selfdocumentingcode selfdocumentingcode added the bug Something isn't working label Mar 9, 2025
Copy link

github-actions bot commented Mar 9, 2025

Hey @selfdocumentingcode, I noticed that you did not correctly follow the issue template. Please ensure that:

  • The bug can still be reproduced on the newest nightly build.
  • The debug information (yazi --debug) is updated for the newest nightly.
  • The non-optional items in the checklist are checked.

Issues with needs info will be marked ready once edited with the proper content, or closed after 2 days of inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs info
Projects
None yet
Development

No branches or pull requests

1 participant