Fixed webgui crash for files without file extension. #656

This commit is contained in:
COLA@Redmine.local 2017-02-10 20:19:49 +01:00
parent 4e1072e8d2
commit 406f1e72b9

View File

@ -270,7 +270,8 @@ class DmsfFileRevision < ActiveRecord::Base
format2.sub!('%v', self.version) format2.sub!('%v', self.version)
format2.sub!('%i', self.dmsf_file.id.to_s) format2.sub!('%i', self.dmsf_file.id.to_s)
format2.sub!('%r', self.id.to_s) format2.sub!('%r', self.id.to_s)
format2 + ext format2 + ext if ext
format2
end end
def self.create_digest(path) def self.create_digest(path)