Fix small file passthrough (#3215)
This commit is contained in:
parent
1e09cffd9b
commit
2b9fde932b
@ -2346,7 +2346,10 @@ static int FIO_decompressFrames(FIO_ctx_t* const fCtx,
|
|||||||
break; /* no more input */
|
break; /* no more input */
|
||||||
}
|
}
|
||||||
readSomething = 1; /* there is at least 1 byte in srcFile */
|
readSomething = 1; /* there is at least 1 byte in srcFile */
|
||||||
if (ress.readCtx->srcBufferLoaded < toRead) {
|
if (ress.readCtx->srcBufferLoaded < toRead) { /* not enough input to check magic number */
|
||||||
|
if ((prefs->overwrite) && !strcmp (dstFileName, stdoutmark)) { /* pass-through mode */
|
||||||
|
return FIO_passThrough(&ress);
|
||||||
|
}
|
||||||
DISPLAYLEVEL(1, "zstd: %s: unknown header \n", srcFileName);
|
DISPLAYLEVEL(1, "zstd: %s: unknown header \n", srcFileName);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -808,6 +808,16 @@ println "Hello world 1!" | zstd -df
|
|||||||
println "Hello world 2!" | zstd -dcf
|
println "Hello world 2!" | zstd -dcf
|
||||||
println "Hello world 3!" > tmp1
|
println "Hello world 3!" > tmp1
|
||||||
zstd -dcf tmp1
|
zstd -dcf tmp1
|
||||||
|
println "" | zstd -df > tmp1
|
||||||
|
println "" > tmp2
|
||||||
|
$DIFF -q tmp1 tmp2
|
||||||
|
println "1" | zstd -df > tmp1
|
||||||
|
println "1" > tmp2
|
||||||
|
$DIFF -q tmp1 tmp2
|
||||||
|
println "12" | zstd -df > tmp1
|
||||||
|
println "12" > tmp2
|
||||||
|
$DIFF -q tmp1 tmp2
|
||||||
|
rm -rf tmp*
|
||||||
|
|
||||||
|
|
||||||
println "\n===> frame concatenation "
|
println "\n===> frame concatenation "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user