zipruby 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of zipruby might be problematic. Click here for more details.

@@ -21,7 +21,7 @@
21
21
 
22
22
  #define TIME2LONG(v) NUM2LONG(rb_funcall((v), rb_intern("tv_sec"), 0))
23
23
 
24
- #define VERSION "0.3.5"
24
+ #define VERSION "0.3.6"
25
25
  #define ERRSTR_BUFSIZE 256
26
26
  #define DATA_BUFSIZE 8192
27
27
 
@@ -359,6 +359,10 @@ static VALUE zipruby_archive_close(VALUE self) {
359
359
  rb_raise(Error, "Close archive failed: %s", zip_strerror(p_archive->archive));
360
360
  }
361
361
 
362
+ if (!NIL_P(p_archive->sources)){
363
+ rb_ary_clear(p_archive->sources);
364
+ }
365
+
362
366
  if (!NIL_P(p_archive->buffer) && changed) {
363
367
  rb_funcall(p_archive->buffer, rb_intern("replace"), 1, rb_funcall(self, rb_intern("read"), 0));
364
368
  }
@@ -1304,6 +1308,10 @@ static VALUE zipruby_archive_commit(VALUE self) {
1304
1308
  rb_raise(Error, "Commit archive failed: %s", zip_strerror(p_archive->archive));
1305
1309
  }
1306
1310
 
1311
+ if (!NIL_P(p_archive->sources)){
1312
+ rb_ary_clear(p_archive->sources);
1313
+ }
1314
+
1307
1315
  if (!NIL_P(p_archive->buffer) && changed) {
1308
1316
  rb_funcall(p_archive->buffer, rb_intern("replace"), 1, rb_funcall(self, rb_intern("read"), 0));
1309
1317
  }
data/zipruby.c CHANGED
@@ -553,6 +553,10 @@ static VALUE zipruby_archive_close(VALUE self) {
553
553
  rb_raise(Error, "Close archive failed: %s", zip_strerror(p_archive->archive));
554
554
  }
555
555
 
556
+ if (!NIL_P(p_archive->sources)){
557
+ rb_ary_clear(p_archive->sources);
558
+ }
559
+
556
560
  if (!NIL_P(p_archive->buffer) && changed) {
557
561
  rb_funcall(p_archive->buffer, rb_intern("replace"), 1, rb_funcall(self, rb_intern("read"), 0));
558
562
  }
@@ -1498,6 +1502,10 @@ static VALUE zipruby_archive_commit(VALUE self) {
1498
1502
  rb_raise(Error, "Commit archive failed: %s", zip_strerror(p_archive->archive));
1499
1503
  }
1500
1504
 
1505
+ if (!NIL_P(p_archive->sources)){
1506
+ rb_ary_clear(p_archive->sources);
1507
+ }
1508
+
1501
1509
  if (!NIL_P(p_archive->buffer) && changed) {
1502
1510
  rb_funcall(p_archive->buffer, rb_intern("replace"), 1, rb_funcall(self, rb_intern("read"), 0));
1503
1511
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zipruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel