Description of problem: When using "tar -tvf - --zstd |", if a "-" subdirectory exists in the working directory, then zstd sends an error message "zstd: /*stdin*\: unsupported format" I had the problem with a "tar -cf - --zstd |" in a huge bash script but I cannot reproduce it, only "tar -tvf - --zstd |" gets the error in my test script Version-Release number of selected component (if applicable): tar 1.33, zstd v1.4.8 How reproducible: See the bash script in http://yves.demur.free.fr/bug_tar_zstd01.bash.zip Steps to Reproduce: 1. 2. 3.
Created attachment 13748 [details] test bash script getting error when "-" exists, and no error if "-" does not exist
First, it looks as if the fault is with zstd, since it is that which is complaining. I have long looked at the attached script, and wonder whether it is necessary to illustrate the fault. It makes heavy reading; is it for running? Are you saying that the problem arises if a subdirectory starts with a '-...', which mkdir does not seem to allow. Or if any directory name includes '-'? Can you give an example of a pathname which throws the error? Or a short directory 'tree' illustrating it? Can you demonstrate the error with zstd alone? Or does it only happen if that is fed from tar -tfv ?
Status: NEW => NEEDINFOCC: (none) => lewyssmith
From the common options of info mkdir ... A single '-' operand is not really an option, though it looks like one. It stands for a file operand, and some tools treat it as standard input, or as standard output if that is clear from the context. For example, 'sort -' reads from standard input, and is equivalent to plain 'sort'. Unless otherwise specified, a '-' can appear as any operand that requires a file name. The zstd command is like the sort command in that it can take it's input from stdin rather then a file by specifying just a hyphen as the name. Since the file name list is expanded by bash, not by zstd, having both input names and a hyphen is not allowed. Closing as invalid. While it doesn't work, it's not supposed to work with a file name of just a -.
CC: (none) => davidwhodginsStatus: NEEDINFO => RESOLVEDResolution: (none) => INVALID