parent
2702544d3f
commit
8a1f47917f
1 changed files with 10 additions and 8 deletions
18
pcompress.c
18
pcompress.c
|
@ -854,7 +854,7 @@ start_decompress(pc_ctx_t *pctx, const char *filename, char *to_filename)
|
||||||
err = 1;
|
err = 1;
|
||||||
goto uncomp_done;
|
goto uncomp_done;
|
||||||
}
|
}
|
||||||
if (to_filename == NULL) {
|
if (to_filename == NULL && !pctx->pipe_mode) {
|
||||||
char *pos;
|
char *pos;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -882,14 +882,16 @@ start_decompress(pc_ctx_t *pctx, const char *filename, char *to_filename)
|
||||||
log_msg(LOG_WARN, 0, "Using %s for output file name.", to_filename);
|
log_msg(LOG_WARN, 0, "Using %s for output file name.", to_filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
origf = to_filename;
|
if (!pctx->pipe_mode) {
|
||||||
if ((to_filename = realpath(origf, NULL)) != NULL) {
|
origf = to_filename;
|
||||||
free((void *)(to_filename));
|
if ((to_filename = realpath(origf, NULL)) != NULL) {
|
||||||
log_msg(LOG_ERR, 0, "File %s exists", origf);
|
free((void *)(to_filename));
|
||||||
err = 1;
|
log_msg(LOG_ERR, 0, "File %s exists", origf);
|
||||||
goto uncomp_done;
|
err = 1;
|
||||||
|
goto uncomp_done;
|
||||||
|
}
|
||||||
|
to_filename = (char *)origf;
|
||||||
}
|
}
|
||||||
to_filename = (char *)origf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
compressed_chunksize = chunksize + CHUNK_HDR_SZ + zlib_buf_extra(chunksize);
|
compressed_chunksize = chunksize + CHUNK_HDR_SZ + zlib_buf_extra(chunksize);
|
||||||
|
|
Loading…
Reference in a new issue