Closed aabacchus closed 6 months ago
Wouldn't this still result in incorrect behaviour if the file has a double quote in its name? Although I think behaviour in that situation wouldn't be any better without this change, so it's probably still better than nothing as is.
EDIT: maybe a better solution would be using the sed call to escape all characters that xargs treats specially with \
, including non-newline whitespace and both types of quotes?
You're right. I've changed this following an example from the POSIX specification for xargs
: prefixing every non-alphanumeric character with a backslash to escape them.
if a package contains a file with a single quote in it's name, xargs complains about an unmatched quote and fails, and the pipeline is aborted. this patch wraps each filename in quotes so that xargs can handle such filenames.
rewrite of #291 to be POSIX-compliant