Merge pull request #321 from gaurish/patch-1
File.join() is our friend for joining paths
This commit is contained in:
commit
fc83680f47
|
@ -52,7 +52,7 @@ Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile|
|
|||
# Two arguments:
|
||||
# - The name of the file as it will appear in the archive
|
||||
# - The original file, including the path to find it
|
||||
zipfile.add(filename, folder + '/' + filename)
|
||||
zipfile.add(filename, File.join(folder, filename))
|
||||
end
|
||||
zipfile.get_output_stream("myFile") { |os| os.write "myFile contains just this" }
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue