Skip to content

Commit 09ceeb5

Browse files
committed
Fix war generation
1 parent cf5ddfe commit 09ceeb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rex/zip/entry.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ class Entry
1212
attr_reader :data
1313

1414
def initialize(fname, data, compmeth, timestamp=nil, attrs=nil, xtra=nil, comment=nil)
15-
@name = fname.unpack("C*").pack("C*")
16-
@data = data.unpack("C*").pack("C*")
15+
@name = fname.unpack("C*").pack("C*") if fname
16+
@data = data.unpack("C*").pack("C*") if data
1717
@xtra = xtra
1818
@xtra ||= ''
1919
@comment = comment

0 commit comments

Comments
 (0)