Skip to content

Commit

Permalink
Sopme fix, probably
Browse files Browse the repository at this point in the history
  • Loading branch information
David FRANCOIS committed Jul 4, 2010
1 parent 5c98853 commit a3f53da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/documentalist.rb
Expand Up @@ -54,7 +54,7 @@ def self.backend_for_conversion(origin, destination)
def self.convert(file=nil, options={})
if options[:input] and options[:input_format] and file.nil?
file = File.join(Dir.tmpdir, "#{rand(10**9)}.#{options[:input_format].to_s}")
File.open(file) { |f| f.write(options[:input]) }
File.open(file, 'w') { |f| f.write(options[:input]) }
end

raise Documentalist::Error.new("#{file} does not exist !") unless File.exist?(file)
Expand Down

0 comments on commit a3f53da

Please sign in to comment.