summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2017-12-04 22:38:00 (GMT)
committerGitHub <noreply@github.com>2017-12-04 22:38:00 (GMT)
commitde49c5bed94f1217e21dc73fe8a22d7d771ebf2e (patch)
treeba5787f80f98974852c419dd5c313df66a97c3ed
parent6c94c94d4673bd2c0bc3ff80ca17cff8c19a465a (diff)
parent42a31aee50ec325fbba93ce405ab83c25fc710e1 (diff)
downloadlz4-de49c5bed94f1217e21dc73fe8a22d7d771ebf2e.zip
lz4-de49c5bed94f1217e21dc73fe8a22d7d771ebf2e.tar.gz
lz4-de49c5bed94f1217e21dc73fe8a22d7d771ebf2e.tar.bz2
Merge pull request #426 from aliceatlas/cli_chmod_fix
Fix cli sometimes calling UTIL_setFileStat on /dev/null
-rw-r--r--programs/lz4io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c
index 57434f7..9bf4e93 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -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);
}