brought the fix for #47667 back

This commit is contained in:
Anatoliy Belsky 2012-06-05 23:22:27 +02:00
parent a37e84e549
commit b8cdc731b8

View File

@ -61,10 +61,16 @@ ZIP_EXTERN(struct zip *)
zip_open(const char *fn, int flags, int *zep)
{
FILE *fp;
if (flags & ZIP_OVERWRITE) {
return _zip_allocate_new(fn, zep);
}
switch (_zip_file_exists(fn, flags, zep)) {
case -1:
return NULL;
if (!(flags & ZIP_OVERWRITE)) {
return NULL;
}
case 0:
return _zip_allocate_new(fn, zep);
default: