Permalink
Browse files

When downloading, create nonexistent path

  • Loading branch information...
charly committed Oct 9, 2012
1 parent 187d0aa commit 4b9967158f8741ac4c6b24f9a9120044eeebb810
Showing with 2 additions and 1 deletion.
  1. +2 −1 app/models/jail/github.rb
@@ -62,7 +62,8 @@ def read
end
def download(type = nil)
- target(type).open('w') {|f| f.write( read ) }
+ t = target(type) and t.parent.mkpath
+ t.open('w') {|f| f.write( read ) }
end
def delete(type = nil)

0 comments on commit 4b99671

Please sign in to comment.