fix a bug in build system that app cannot be built with Ruby 2.1 when it would use UTF-8 as app name

http://hipbyte.myjetbrains.com/youtrack/issue/RM-370
This commit is contained in:
Watson
2014-01-09 10:43:03 +09:00
parent 2031546bdf
commit aacac95be9

View File

@@ -495,7 +495,14 @@ EOS
end
def convert_filesystem_encoding(string)
eval `#{@nfd} "#{string}"`
if RUBY_VERSION < "2.1.0"
return eval `#{@nfd} "#{string}"`
else
# Dir.glob on Ruby 2.1 returns file path as "Normalization Form C".
# So, we do not convert to "Normalization Form D".
# (Ruby 2.0 or below, Dir.glob returns "Normalization Form D").
return string
end
end
def copy_resource(res_path, dest_path)