blob: 98d0841ca224361b47f34e577c40c865def9abf7 [file] [log] [blame]
#include <stdlib.h>
#include "zip.h"
#include "zipint.h"
int
_zip_unchange_data(struct zip_entry *ze)
{
int ret;
if (ze->ch_func) {
ret = ze->ch_func(ze->ch_data, NULL, 0, ZIP_CMD_CLOSE);
ze->ch_func = NULL;
}
free(ze->ch_data);
ze->ch_data = NULL;
ze->ch_comp = 0;
ze->state = (ze->fn_old || ze->ch_meta) ? ZIP_ST_RENAMED
: ZIP_ST_UNCHANGED;
return ret;
}