]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Explicit error message when dst file cannot be created / opened
authorYann Collet <yann.collet.73@gmail.com>
Fri, 1 Jul 2016 22:12:14 +0000 (00:12 +0200)
committerYann Collet <yann.collet.73@gmail.com>
Fri, 1 Jul 2016 22:12:14 +0000 (00:12 +0200)
programs/.gitignore
programs/fileio.c

index cbe39dcdf0e8d5838ba789423958c8c989a1f1d2..8d6e993e799338122c1351bdb5ee7fae649a8150 100644 (file)
@@ -43,6 +43,7 @@ _*
 tmp*
 *.zst
 result
+out
 
 # fuzzer
 afl
index c5a985c7f2ddd4619fdfc92b3a362c80d2277ad5..83d3c61f7c8e31a1cd56a56be5f452143873ae2a 100644 (file)
@@ -411,7 +411,7 @@ static int FIO_compressFilename_dstFile(cRess_t ress,
     int result;
 
     ress.dstFile = FIO_openDstFile(dstFileName);
-    if (ress.dstFile==0) return 1;
+    if (ress.dstFile==0) { DISPLAYLEVEL(1, "zstd: %s: cannot open \n", dstFileName); return 1; }
 
     result = FIO_compressFilename_srcFile(ress, dstFileName, srcFileName, cLevel);