mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
[programs] don’t do chmod when coming from stdin or multiple files
Fixes #1729
This commit is contained in:
@ -585,7 +585,7 @@ static FILE* FIO_openDstFile(FIO_prefs_t* const prefs, const char* srcFileName,
|
||||
{ FILE* const f = fopen( dstFileName, "wb" );
|
||||
if (f == NULL) {
|
||||
DISPLAYLEVEL(1, "zstd: %s: %s\n", dstFileName, strerror(errno));
|
||||
} else {
|
||||
} else if(srcFileName != NULL && strcmp (srcFileName, stdinmark)) {
|
||||
chmod(dstFileName, 00600);
|
||||
}
|
||||
return f;
|
||||
|
Reference in New Issue
Block a user