libmpm

morphux C package management library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/libmpm

commit a0c4b14efff83ce7a963c78f4c945f6f15b14ef7
parent 7cbb1d66d0d70ec90f19246c5904eacb5ab0b166
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Sat, 22 Apr 2017 23:53:04 +0200

Fix(Packer): Better encryption, and add a forgotten chdir

Diffstat:
Msrc/packer.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/packer.c b/src/packer.c @@ -529,7 +529,7 @@ static bool get_file_information(packer_file_t *file) { stream.avail_out = file_size; stream.next_out = (Bytef *)chunk; - deflateInit(&stream, Z_DEFAULT_COMPRESSION); + deflateInit(&stream, Z_BEST_COMPRESSION); deflate(&stream, Z_FINISH); deflateEnd(&stream); @@ -619,7 +619,10 @@ static bool write_packer_sources(FILE *fd, packer_t *ctx, const char *dir_name) /* No file to process, all good */ if (list_size(files_list) == 0) + { + chdir(old_pwd); return true; + } packer_file_t *file; list_for_each(files_list, tmp, file) {