Sort files by name

Added by rsa rsa about 2 years ago

I used last version Redmine 4.1.1
And add in project some a files with names

1.10.1.txt
1.2.0.txt

If i use sort by filename i have the same:
1.10.1.txt
1.2.0.txt

How to change the code to sort it
1.2.0.txt
1.10.1.txt
?

I suppose to need to edit files_controller.rb
part

  def index
    sort_init 'filename', 'asc'
    sort_update 'filename' => "#{Attachment.table_name}.filename",

But how?