Vim edit through webdav causes lose of all file versions besides last. #1413

This commit is contained in:
Karel Pičman 2022-12-23 07:44:23 +01:00
parent a7375b8d1a
commit bd9b465fa5

View File

@ -776,6 +776,11 @@ module RedmineDmsf
r.size = 0
r.digest = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
r.disk_filename = r.new_storage_filename
r.available_custom_fields.each do |cf| # Add default value for CFs not existing
if cf.default_value
r.custom_field_values << CustomValue.new({ custom_field: cf, value: cf.default_value})
end
end
if r.save(validate: false) # Skip validation due to invalid characters in the filename
FileUtils.touch r.disk_file(false)
return f