uutils / uutils/coreutils

ls: Windows - ls -l does not play well with Linux style mounting or cross drive junctions

Open
#3,560 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - ls wontfix
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

When using "Linux style mounting" for drives in windows instead as a letter drive (C: D: E:) mounting ls -l does not understand what to do. This also goes for junctions pointing to letter drives roots.

Administrator in B-Station in ~ 
PS > ls -l .\Programs\
---------- 1 somebody somegroup 0 Nov 18  2021 ''\''.\Programs\'\''' -> 'C:\Programs'
Administrator in B-Station in ~ 
PS > cd .\Programs\
Administrator in B-Station in ~\Programs 
PS > ls -l
---------- 1 somebody somegroup 0 Nov 18  2021 . -> 'C:\Programs'
Administrator in B-Station in ~\Programs 
PS > ls
.icon  Bin  Lib  Src  Startup  SteamApps
Administrator in B-Station in ~\Programs 
PS > cd /
Administrator in B-Station in C: 
PS > ls -l C:\Programs\   
---------- 1 somebody somegroup 0 Nov 18  2021 ''\''C:\Programs\'\''' -> 'Volume{172295dd-7000-4af9-9d24-d2b7d9445fe9}\'
Administrator in B-Station in C: 
PS > cd .\Programs\       
Administrator in B-Station in C:\Programs 
PS > ls
.icon  Bin  Lib  Src  Startup  SteamApps
Administrator in B-Station in C:\Programs 
PS > ls -l
---------- 1 somebody somegroup 0 Nov 18  2021 . -> 'Volume{172295dd-7000-4af9-9d24-d2b7d9445fe9}\'
Administrator in B-Station in C:\Programs 
PS > cd
Administrator in B-Station in ~ 
PS > ls -l .\Repositories\
---------- 1 somebody somegroup 0 Nov 18  2021 ''\''.\Repositories\'\''' -> 'D:\'
Administrator in B-Station in ~ 
PS > cd .\Repositories\
Administrator in B-Station in ~\Repositories 
PS > ls   
Arma3          BlackOrder   OzilusOs          SpaceEngineers       dotfiles                 win-upgrade
Arma3Mission   DiskImages   PhoneRootProject  Tools                dotfiles.code-workspace
Arma3Resorces  GameConsept  Python            arma3-scoop-bucket   hoidev
ArmaRAddons    HoI4         RimWorld          arma3FixBinMake.reg  jmonkeyengine
ArmaRResorces  JS           Rust              armadev              secure
Baurotrama     Other        ShadowMisc        armake2              wdotfiles
Administrator in B-Station in ~\Repositories 
PS > ls -l
---------- 1 somebody somegroup 0 Nov 18  2021 . -> 'D:\'
Administrator in B-Station in ~\Repositories 

Screenshots of terminals below

"Linux style" mount point
image

Junction to letter drive
image

Setup
PS > pwsh
PowerShell 7.2.4
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS > starship
starship 1.6.3
Starship Contributors
The cross-shell prompt for astronauts. ☄🌌️

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported ls -l output on Windows using a Linux-style drive mount and a junction targeting a drive root. Compare the displayed link targets with the paths returned by ls without -l; done means ls -l represents both mount points and cross-drive junctions without the shown malformed names or targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.