In Windows, lsd won't list files whose full pathname exceeds 260 characters
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 510
- PR merge metrics
- No merged PRs in 30d
Description
- os: Windows 11
- `lsd --version`: lsd 1.2.0
- `echo $TERM`: %TERM% and $TERM are not set
- `echo $LS_COLORS`: not set
## Expected behavior
`lsd.exe`, as with `cmd.exe`'s DIR command, should list files even if their full pathnames exceed 260 characters. Here is an example with DIR on a very long folder path, where one file in a directory has a full pathname longer than 260 chars, and another pathname is shorter than 260 characters:
```
D:\TestDir1\VeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPath\MorePathMorePathMorePath\EvenMorePath1\EvenMorePath2\EvenMorePath3>dir
Volume in drive D is DATA
Volume Serial Number is C8FD-7AA3
Directory of D:\TestDir1\VeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPath\MorePathMorePathMorePath\EvenMorePath1\EvenMorePath2\EvenMorePath3
2025-12-18 17:58 .
2025-12-18 17:56 ..
2025-12-18 17:57 8 File.txt
2025-12-18 17:58 8 ThisFileNameExceeds260Chars.txt
2 File(s) 16 bytes
2 Dir(s) 3,382,207,172,608 bytes free
```
## Actual behavior
`lsd.exe` lists the files in the directory only if their full pathnames are shorter than 260 characters, so one file is skipped:
```
D:\TestDir1\VeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPath\MorePathMorePathMorePath\EvenMorePath1\EvenMorePath2\EvenMorePath3>lsd -l
.a--- ? ? 8 B Thu Dec 18 17:57:23 2025 File.txt
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue on Windows 11 using the long pathname shown in the report, comparing lsd.exe with cmd.exe's DIR command. Trace the Windows path handling used when listing directory entries. Done means lsd.exe lists files whose full pathnames exceed 260 characters, including ThisFileNameExceeds260Chars.txt, without regressing shorter paths.
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
- 48/100