[programs] Don’t try to chmod a dst file if it can’t be opened
Repairs an oversight in my last commit, thanks @Cyan4973
This commit is contained in:
1 parent
3968160a91
commit
af80f6dfac
1 file changed
+4
-2
+4
-2
@@ -564,9 +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));
|
||||
chmod(dstFileName, 00600);
|
||||
} else {
|
||||
chmod(dstFileName, 00600);
|
||||
}
|
||||
return f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user