Merge pull request #1644 from chungy/chmod_600

[programs] set chmod 600 after opening destination file
This commit is contained in:
Yann Collet 2019-06-13 17:25:31 -07:00 committed by GitHub
commit b0592024e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -564,8 +564,11 @@ static FILE* FIO_openDstFile(FIO_prefs_t* const prefs, const char* srcFileName,
} }
{ FILE* const f = fopen( dstFileName, "wb" );
if (f == NULL)
if (f == NULL) {
DISPLAYLEVEL(1, "zstd: %s: %s\n", dstFileName, strerror(errno));
} else {
chmod(dstFileName, 00600);
}
return f;
}
}