Skip to content

Commit

Permalink
brought the fix for #47667 back
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Jun 7, 2012
1 parent a37e84e commit b8cdc73
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ext/zip/lib/zip_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b8cdc73

Please sign in to comment.