diff options
Diffstat (limited to 'app/models/attachment.rb')
-rw-r--r-- | app/models/attachment.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb index afba75e60..8304d4dea 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -506,7 +506,8 @@ class Attachment < ActiveRecord::Base # keep the extension if any ascii << $1 if filename =~ %r{(\.[a-zA-Z0-9]+)$} end - while File.exist?(File.join(storage_path, directory.to_s, "#{timestamp}_#{ascii}")) + while File.exist?(File.join(storage_path, directory.to_s, + "#{timestamp}_#{ascii}")) timestamp.succ! end "#{timestamp}_#{ascii}" |