##// END OF EJS Templates
scm: prevent PostgreSQL or Ruby 1.9 errors if paths is invalid UTF-8....
Toshi MARUYAMA -
r5355:5512e397eeb0
parent child
Show More
@@ -1,5 +1,5
1 # redMine - project management software
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
1 # Redmine - project management software
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
@@ -25,6 +25,11 class Change < ActiveRecord::Base
25 25 changeset.repository.relative_path(path)
26 26 end
27 27
28 def before_validation
29 self.path = Redmine::CodesetUtil.replace_invalid_utf8(self.path)
30 self.from_path = Redmine::CodesetUtil.replace_invalid_utf8(self.from_path)
31 end
32
28 33 def init_path
29 34 self.path ||= ""
30 35 end
General Comments 0
You need to be logged in to leave comments. Login now