Skip to content

Commit

Permalink
[programs] don’t do chmod on destination file if reading from stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
chungy committed Aug 20, 2019
1 parent c9072ee commit 7c57ce4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions programs/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,8 @@ 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 {
chmod(dstFileName, 00600);
} else if(srcFileName != NULL && strcmp (srcFileName, stdinmark)) {
chmod(dstFileName, 00600);
}
return f;
}
Expand Down

0 comments on commit 7c57ce4

Please sign in to comment.