lib/alula/assethelper.rb in alula-0.2.0 vs lib/alula/assethelper.rb in alula-0.2.1
- old
+ new
@@ -47,10 +47,10 @@
end
# Create output path
FileUtils.mkdir_p(file_path)
# Copy asset to originals
- if options[:type] == :attachment
+ if options[:type] == :attachment and !File.exists?(File.join("attachments", "originals", @asset_path, "#{name}.#{ext}"))
FileUtils.mkdir_p File.join("attachments", "originals", @asset_path)
FileUtils.cp asset, File.join("attachments", "originals", @asset_path, "#{name}.#{ext}")
end
# Create normal photo