bug(basenc): when appending a/ to a regular file regardless of the encoding, reports wrong error messages
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Hi, uutils mainteners
i want let you known, that appending / to a regular file causes reporting wrong error messages no such file or directory, as our testing confirms
all encoding options have the same issue
relunsec@relunsec:~/software/coreutils/target/debug$ ./basenc --base64url a/
basenc: a/: No such file or directory
relunsec@relunsec:~/software/coreutils/target/debug$ ./basenc --base32 a/
basenc: a/: No such file or directory
relunsec@relunsec:~/software/coreutils/target/debug$ ./basenc --base64 a/
basenc: a/: No such file or directory
relunsec@relunsec:~/software/coreutils/target/debug$ ./basenc --base32hex a/
basenc: a/: No such file or directory
relunsec@relunsec:~/software/coreutils/target/debug$ ./basenc --base16 a/
basenc: a/: No such file or directory
relunsec@relunsec:~/software/coreutils/target/debug$ ./basenc --base2lsbf a/
basenc: a/: No such file or directory
relunsec@relunsec:~/software/coreutils/target/debug$ ./basenc --base2msbf a/
basenc: a/: No such file or directory
relunsec@relunsec:~/software/coreutils/target/debug$ ./basenc --z85 a/
basenc: a/: No such file or directory
relunsec@relunsec:~/software/coreutils/target/debug$ ./basenc --base58 a/
basenc: a/: No such file or directory
while the GNU one correctly errors out
relunsec@relunsec:~/software/coreutils/target/debug$ gnubasenc --base64 a/
gnubasenc: a/: Not a directory
relunsec@relunsec:~/software/coreutils/target/debug$
Contributor guide
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
Start by reproducing the listed basenc commands with a regular file followed by a/ and compare their diagnostics with GNU basenc. Trace basenc's input-path handling and error reporting across the encoding options; done means reporting “Not a directory” rather than “No such file or directory” for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100