coreutils
coreutils copied to clipboard
chmod: Fix chmod -c --reference reporting when no change is made
Fix for issue #6009. I changed the code so that the old permission octal is retrieved in "full form" (6 octal digits). It is afterwards set to 4 digits when displayed.
Beforehand, 2 identical permissions were marked as different because of the different formats, resulting in incorrect displays for -c.
Is it possible to add a test for this? :)
@BenWiederhake yep! It also failed a test beforehand so I kind of flipped the logic: made the reference permission 4 octals long, just as the others.
GNU testsuite comparison:
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)
Thanks for your PR!