Merge pull request #426 from aliceatlas/cli_chmod_fix

Fix cli sometimes calling UTIL_setFileStat on /dev/null
This commit is contained in:
Yann Collet 2017-12-04 14:38:00 -08:00 committed by GitHub
commit de49c5bed9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -616,7 +616,7 @@ static int LZ4IO_compressFilename_extRess(cRess_t ress, const char* srcFileName,
/* Copy owner, file permissions and modification time */
{ stat_t statbuf;
if (strcmp (srcFileName, stdinmark) && strcmp (dstFileName, stdoutmark) && UTIL_getFileStat(srcFileName, &statbuf))
if (strcmp (srcFileName, stdinmark) && strcmp (dstFileName, stdoutmark) && strcmp (dstFileName, nulmark) && UTIL_getFileStat(srcFileName, &statbuf))
UTIL_setFileStat(dstFileName, &statbuf);
}