lib/storage/strategies/file_system.rb in storage-0.3.2 vs lib/storage/strategies/file_system.rb in storage-0.3.3
- old
+ new
@@ -33,11 +33,9 @@
def store(file, options = {})
prepare!
file = File.open(file, "rb") unless file.respond_to?(:read) && !file.kind_of?(Pathname)
path = fullpath(options[:name])
- raise Storage::FileAlreadyExistsError if File.file?(path)
-
File.open(path, "wb") do |handler|
while line = file.gets
handler.write line
end
end