Fixed logic for stdout output
This commit is contained in:
parent
1ebe360d0f
commit
dd3dac9ce0
@ -2124,19 +2124,21 @@ FIO_decompressZstdFrame(FIO_ctx_t* const fCtx, dRess_t* ress, FILE* finput,
|
|||||||
/* Write block */
|
/* Write block */
|
||||||
storedSkips = FIO_fwriteSparse(ress->dstFile, ress->dstBuffer, outBuff.pos, prefs, storedSkips);
|
storedSkips = FIO_fwriteSparse(ress->dstFile, ress->dstBuffer, outBuff.pos, prefs, storedSkips);
|
||||||
frameSize += outBuff.pos;
|
frameSize += outBuff.pos;
|
||||||
if (fCtx->nbFilesTotal > 1) {
|
if (!fCtx->hasStdoutOutput) {
|
||||||
size_t srcFileNameSize = strlen(srcFileName);
|
if (fCtx->nbFilesTotal > 1) {
|
||||||
if (srcFileNameSize > 18) {
|
size_t srcFileNameSize = strlen(srcFileName);
|
||||||
const char* truncatedSrcFileName = srcFileName + srcFileNameSize - 15;
|
if (srcFileNameSize > 18) {
|
||||||
DISPLAYUPDATE(2, "\rDecompress: %2u/%2u files. Current: ...%s : %u MB... ",
|
const char* truncatedSrcFileName = srcFileName + srcFileNameSize - 15;
|
||||||
fCtx->currFileIdx+1, fCtx->nbFilesTotal, truncatedSrcFileName, (unsigned)((alreadyDecoded+frameSize)>>20) );
|
DISPLAYUPDATE(2, "\rDecompress: %2u/%2u files. Current: ...%s : %u MB... ",
|
||||||
|
fCtx->currFileIdx+1, fCtx->nbFilesTotal, truncatedSrcFileName, (unsigned)((alreadyDecoded+frameSize)>>20) );
|
||||||
|
} else {
|
||||||
|
DISPLAYUPDATE(2, "\rDecompress: %2u/%2u files. Current: %s : %u MB... ",
|
||||||
|
fCtx->currFileIdx+1, fCtx->nbFilesTotal, srcFileName, (unsigned)((alreadyDecoded+frameSize)>>20) );
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
DISPLAYUPDATE(2, "\rDecompress: %2u/%2u files. Current: %s : %u MB... ",
|
DISPLAYUPDATE(2, "\r%-20.20s : %u MB... ",
|
||||||
fCtx->currFileIdx+1, fCtx->nbFilesTotal, srcFileName, (unsigned)((alreadyDecoded+frameSize)>>20) );
|
srcFileName, (unsigned)((alreadyDecoded+frameSize)>>20) );
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
DISPLAYUPDATE(2, "\r%-20.20s : %u MB... ",
|
|
||||||
srcFileName, (unsigned)((alreadyDecoded+frameSize)>>20) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inBuff.pos > 0) {
|
if (inBuff.pos > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user