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
+4 -1
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;
}
}