uutils / uutils/coreutils

ls: File not found exception with wildcard (expression) is not caught in Windows.

Open
#6,710 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Coreutils: 0.0.27 Release
Windows 11 23H2 (OS Build 22631.4169)
Debian 12

Windows:

PS C:\Users\hanbings\test> coreutils ls
a.txt
PS C:\Users\hanbings\test> coreutils ls "a.txtt"
ls: cannot access 'a.txtt': No such file or directory
PS C:\Users\hanbings\test> coreutils ls "a.txtt*"
ls: unknown io error: '"a.txtt*"', 
'Os { 
    code: 123, 
    kind: InvalidFilename, 
    message: "The filename, directory name, or volume label syntax is incorrect." 
}'
PS C:\Users\hanbings\test>

Debian:

root@application:~/test# ./coreutils ls
a.txt  coreutils
root@application:~/test# ./coreutils ls "a.txtt"
ls: cannot access 'a.txtt': No such file or directory
root@application:~/test# ./coreutils ls "a.txtt*"
ls: cannot access 'a.txtt*': No such file or directory
root@application:~/test# ./coreutils ls a.txtt
ls: cannot access 'a.txtt': No such file or directory
root@application:~/test# ./coreutils ls a.txt
a.txt

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

Start by reproducing the Windows 11 command coreutils ls "a.txtt*" and compare it with the Debian behavior shown in the report. Trace the ls wildcard and file-not-found error handling, then verify that an unmatched wildcard produces the expected no-such-file message on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.