]> git.ipfire.org Git - thirdparty/coreutils.git/commit
head,tail: quote name in file headers appropriately
authorPádraig Brady <P@draigBrady.com>
Mon, 25 May 2026 14:56:34 +0000 (15:56 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 25 May 2026 15:07:05 +0000 (16:07 +0100)
commitfdcfb10873f944b6ac0fb07a3220295c21f6ea85
treebcc6197c040bd326dd25a1c222aa9c92f764edac
parentb2095290fba9d55f4ccca07b1ec89e770cd88633
head,tail: quote name in file headers appropriately

* src/tail.c (write_header): Use quotef() to quote
file names when needed.
* src/head.c (write_header): Likewise.
* tests/head/quote-headers.sh: Add a new test.
* tests/tail/quote-headers.sh: Add a new test.
* tests/local.mk: Reference the new test.
Reported by Michał Majchrowicz.
NEWS
src/head.c
src/tail.c
tests/head/quote-headers.sh [new file with mode: 0755]
tests/local.mk
tests/tail/quote-headers.sh [new file with mode: 0755]