lib/gitdocs/server.rb in gitdocs-0.3.4 vs lib/gitdocs/server.rb in gitdocs-0.3.5
- old
+ new
@@ -45,10 +45,10 @@
parent = File.dirname(file_path)
parent = '' if parent == '/'
parent = nil if parent == '.'
locals = {:idx => idx, :parent => parent, :root => gd.root, :file_path => expanded_path}
mode, mime = request.params['mode'], `file -I #{ShellTools.escape(expanded_path)}`.strip
- puts "mode, mime: #{mode.inspect}, #{mime.inspect}"
+ # puts "mode, mime: #{mode.inspect}, #{mime.inspect}"
if mode == 'save' # Saving
File.open(expanded_path, 'w') { |f| f.print request.params['data'] }
redirect! "/" + idx.to_s + file_path
elsif mode == 'upload' # Uploading
halt 404 unless file = request.params['file']
\ No newline at end of file