Skip to content

Commit 83da0b3

Browse files
committed
Correct fname
1 parent 19e47d5 commit 83da0b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/rex/zip/archive.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ def add_file(fname, fdata=nil, xtra=nil, comment=nil)
3737
if (st.directory?)
3838
attrs = EFA_ISDIR
3939
fdata = ''
40+
unless fdata[-1] == '/'
41+
fdata << '/'
42+
end
4043
else
4144
f = File.open(fname, 'rb')
4245
fdata = f.read(f.stat.size)

0 commit comments

Comments
 (0)