autolab / Autolab

Course management service that enables auto-graded programming assignments.
http://www.autolabproject.com/
Apache License 2.0
752 stars 214 forks source link

Zip archive reading fails for empty file #192

Closed ymzong closed 9 years ago

ymzong commented 9 years ago

The following exception happens when a file inside a zip archive is empty:

A NoMethodError occurred in background at 2015-01-26 18:35:17 -0500 :

  undefined method `read' for Zip::NullInputStream:Module
  /opt/autolab/build/Autolab/app/controllers/submissions_controller.rb:791:in `block in getFileAt'
dlbucci commented 9 years ago

This can happen if there's a folder inside of the zip file and someone tries to download it. I think our old archive code handled nested files, but our new one appears to just show the top level folder...

dlbucci commented 9 years ago

Fixed by #357