Skip to content

Commit

Permalink
[programs] don’t do chmod when coming from stdin or multiple files
Browse files Browse the repository at this point in the history
Fixes #1729
  • Loading branch information
chungy committed Aug 20, 2019
1 parent c9072ee commit d405a10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion programs/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,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;
Expand Down

0 comments on commit d405a10

Please sign in to comment.