8000 cksum: show error if a directory is specified · Issue #5805 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cksum: show error if a directory is specified #5805

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

Closed
cakebaker opened this issue Jan 8, 2024 · 4 comments · Fixed by #5822
Closed

cksum: show error if a directory is specified #5805

cakebaker opened this issue Jan 8, 2024 · 4 comments · Fixed by #5822
Labels

Comments

@cakebaker
Copy link
Contributor

GNU cksum shows an error and returns an exit code of 1 if a directory is specified:

$ cksum dir file
cksum: dir: Is a directory
4294967295 0 file
$ echo $?
1

uutils cksum, on the other hand, doesn't show an error and returns an exit code of 0:

$ cargo run cksum dir file
4294967295 0 dir
4294967295 0 file
$ echo $?
0

The same applies to -a/--algorithm with all algorithms.

@tertsdiepraam
Copy link
Member

Is this a generalization of #5804? I was just thinking there that blake2b wouldn't be the only case. In #5804, the error is generated manually, but "Is a directory" usually comes from an io error. I think it's probably worth investigating what our cksum is even doing on directories.

8000

@cakebaker
Copy link
Contributor Author

Yes, it is a generalization of it.

@Ato2207
Copy link
Contributor
Ato2207 commented Jan 8, 2024

I could take on this issue too if it is ok, should be a small modification.

@cakebaker
Copy link
Contributor Author

Sure, go ahead :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants
0