Dorian Péron
ba7c02860e
feat(checksum): odd number of hexa characters is wrong formatting
2024-11-26 01:47:10 +01:00
Dorian Péron
7c4724edc3
feat(checksum): refactor ChecksumResult to include more counters in it
...
- Add comments to explain what each field is counting
2024-11-26 01:47:10 +01:00
Dorian Péron
a0af49f2d8
feat(checksum): get rid of the properly_formatted variable
2024-11-26 01:47:10 +01:00
Dorian Péron
f3763ef190
feat(checksum): simplify get_expected_checksum
...
- Rename the function to emphasize its goal
- Do not pass the filename anymore, as it is only used to create an error, that may be done in the scope calling the function
- Change the return type to Option, as the error is made in the outer scope
- Don't try to decode the base64 string as UTF8 string. This most oftenly fails and is wrong.
- Get rid of the `bytes_to_hex` function, as it provides the same functionality as `hex::encode`
2024-11-26 01:47:10 +01:00
Dorian Péron
a3b7403550
feat(checksum): improve FileCheckError variants to be meaningful
2024-11-26 01:47:10 +01:00
Daniel Hofstetter
cc3353ed7a
Bump cpp & cpp_build from 0.5.9 to 0.5.10
2024-11-25 09:03:26 +01:00
Daniel Hofstetter
881044aef0
Merge pull request #6861 from sylvestre/dup-source
...
mv: fix the output of an error message
2024-11-21 16:26:33 +01:00
Daniel Hofstetter
e37d2f2a2b
Merge pull request #6878 from sylvestre/du
...
du: fix the display with --inodes
2024-11-21 10:42:48 +01:00
Sylvestre Ledru
1b2778b819
du: fix the size display with --inodes
2024-11-20 16:13:54 -05:00
Sylvestre Ledru
76d14ed484
du: fix the count with --inodes
2024-11-20 16:13:52 -05:00
steinwand6
c986fb7d2e
seq: add overflow checks when parsing exponents ( #6858 )
...
* seq: remove ignore flag from test_invalid_float_point_fail_properly(#6235 )
* seq: prevent overflow in parse_exponent_no_decimal
* seq: add tests for invalid floating point arguments
* seq: add overflow checks when parsing decimal with exponent
* seq: add overflow checks
2024-11-20 16:11:04 +01:00
Sylvestre Ledru
7ffe3d49ef
mv: fix the output of an error message
...
+ adjust a GNU test
Should make tests/mv/dup-source.sh pass
2024-11-20 08:03:40 -05:00
Sylvestre Ledru
fb1874bff9
Merge pull request #6877 from cakebaker/use_div_ceil_from_std
...
Use `div_ceil()` from `std`
2024-11-20 12:26:46 +01:00
Daniel Hofstetter
cfe2c9f6da
uucore: remove div_ceil() from sum feature
2024-11-20 09:20:41 +01:00
Daniel Hofstetter
fc2f73b16c
cksum: use div_ceil() from std
2024-11-20 09:17:14 +01:00
Daniel Hofstetter
7fb0f8a29d
sum: use div_ceil() from std
2024-11-20 09:13:32 +01:00
Daniel Hofstetter
28e9a88077
du: use div_ceil() from std
2024-11-20 09:10:39 +01:00
Jesse Schalken
d2fc3914ff
du: use metadata from DirEntry where possible
2024-11-19 16:05:20 +01:00
Daniel Hofstetter
19a19f004f
Merge pull request #6854 from sylvestre/fmt
...
fmt: generate an error if the input is a directory
2024-11-18 16:18:41 +01:00
Dorian Péron
a09c7cc0d2
feat(checksum): add doc
2024-11-16 22:44:08 +01:00
Dorian Péron
5309b65867
feat(checksum): change process_checksum_line return type to Result<(), LineCheckError>
...
- Treat digest mismatch as an error
2024-11-16 22:44:08 +01:00
Dorian Péron
4ffedcdac6
feat(checksum): get rid of ChecksumResult in get_file_to_check
2024-11-16 22:44:08 +01:00
Dorian Péron
b6c726602f
feat(checksum): get rid of correct_format at the line level
2024-11-16 22:44:08 +01:00
Dorian Péron
afcf93b3e3
feat(checksum): extract file processing into a separate function
2024-11-16 22:44:08 +01:00
Dorian Péron
df0da55645
feat(checksum): extract line processing into a separate function
2024-11-16 22:44:08 +01:00
Dorian Péron
07b9fb8a20
feat(checksum): group flags under a ChecksumOptions struct
2024-11-16 22:44:08 +01:00
Sylvestre Ledru
ab77eaea45
fmt: generate an error if the input is a directory
...
tested by tests/misc/read-errors
2024-11-16 19:49:44 +01:00
Laurent Cheylus
15b3194d30
sort: enable clippy::suspicious_open_options on OpenBSD
...
On OpenBSD 7.6 (release October 2024), Rust version = 1.81.0 => we can now enable
clippy::suspicious_open_options.
Revert commit ee4392e30c
Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-11-14 13:52:00 +01:00
Sylvestre Ledru
9932aec085
prepare version 0.0.28
2024-11-03 20:59:42 +01:00
Daniel Hofstetter
27fc9f614f
Merge pull request #6837 from matrixhead/dup-source
...
mv: gnu test `dup-src` compatibilty
2024-11-01 09:34:43 +01:00
mhead
2c528cfcb5
mv: fix error message when one of the multiple src doesn't exist
2024-11-01 13:35:47 +05:30
Daniel Hofstetter
d1f2534811
Merge pull request #6825 from matrixhead/dup-source
...
cp: normalize path when checking for duplicate source
2024-10-31 11:26:35 +01:00
mhead
ff586b47d4
cp: Duplicate source error message specify the type of file.
2024-10-31 11:49:29 +05:30
Daringcuteseal
41f52f3402
mkdir: allow --parent to be provided more than once
2024-10-31 04:49:44 +07:00
Sylvestre Ledru
bf6de81a1f
Merge pull request #6806 from Ecordonnier/eco/signal-handler
...
uucore: disable default signal-handlers added by Rust
2024-10-30 08:36:01 +01:00
mhead
4d5bf4205f
cp: skip duplicate source check when --backup is given
2024-10-27 14:18:20 +05:30
mhead
74cd797c8a
cp: normalize path when checking for duplicate source
2024-10-26 12:09:38 +05:30
Etienne Cordonnier
b68eb04b8b
uucore: disable default signal-handlers added by Rust
...
Fixes https://github.com/uutils/coreutils/issues/6759
Test procedure (verifies that a single SIGSEGV stops a program):
```
ecordonnier@lj8k2dq3:~/dev/coreutils$ ./target/release/coreutils sleep 100 &
[1] 4175464
ecordonnier@lj8k2dq3:~/dev/coreutils$ kill -11 $(pidof coreutils)
ecordonnier@lj8k2dq3:~/dev/coreutils$
[1]+ Segmentation fault (core dumped) ./target/release/coreutils sleep 100
```
2024-10-25 16:47:40 +02:00
Andrew Liebenow
186d749e94
Replace commented-out code with TODO comments
2024-10-24 13:12:38 -05:00
Dorian Péron
99cddd16f1
uucore(checksum): fix non-utf-8 filename printing
2024-10-24 11:43:52 +02:00
Dorian Péron
8490461d67
uucore(checksum): handle non-utf-8 text in checksum files
2024-10-24 11:43:52 +02:00
Dorian Péron
1c41a12fb5
test(cksum): add test for trailing spaces making an error
2024-10-24 11:43:52 +02:00
Dorian Péron
97b81a6685
uucore(checksum): determine regex from full line, not trimmed
...
The full line will be matched against the selected regex anyway
2024-10-24 11:41:54 +02:00
Dorian Péron
3031874d22
uucore(lib): add u8/OsString conversion utils
2024-10-24 11:41:54 +02:00
Dorian Péron
0b31e43fac
cksum: implement --zero flag with newline/NUL replacement
2024-10-24 00:26:05 +02:00
Terts Diepraam
6850be2539
Merge pull request #6810 from cakebaker/echo_remove_double_negation
...
echo: remove double negation
2024-10-23 10:24:26 +02:00
Pistonight
ca6d0eda3d
hashsum: Windows: check in binary mode by default and allow --binary/--text whcn checking
2024-10-22 11:55:49 -07:00
Daniel Hofstetter
c4160f2dd7
Merge pull request #6801 from Luv-Ray/cksum_error_handling
...
cksum: fix error handling
2024-10-22 16:35:36 +02:00
Daniel Hofstetter
13df9e2f30
echo: remove double negation
2024-10-22 15:04:16 +02:00
Luv-Ray
d5cc3dd8ee
cksum: fix error handling
2024-10-22 20:20:18 +08:00