[programs] don’t do chmod when coming from stdin or multiple files

Fixes #1729
This commit is contained in:
Mike Swanson
2019-09-02 18:02:32 -07:00
parent b199bb3e0a
commit 25878b2de9
+1 -1
View File
@@ -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;