Skip to content

Commit

Permalink
Correct fname
Browse files Browse the repository at this point in the history
  • Loading branch information
Meatballs1 committed Aug 24, 2013
1 parent 19e47d5 commit 83da0b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/rex/zip/archive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def add_file(fname, fdata=nil, xtra=nil, comment=nil)
if (st.directory?)
attrs = EFA_ISDIR
fdata = ''
unless fdata[-1] == '/'
fdata << '/'
end
else
f = File.open(fname, 'rb')
fdata = f.read(f.stat.size)
Expand Down

0 comments on commit 83da0b3

Please sign in to comment.