Cache: re-encode file names in default encoding

This commit is contained in:
Josh Holtrop 2013-09-20 15:58:55 -04:00
parent e041ea6612
commit 3339cf5280

View File

@ -129,12 +129,12 @@ module Rscons
# @param command [Array] The command used to build the target. # @param command [Array] The command used to build the target.
# @param deps [Array] List of dependencies for the target. # @param deps [Array] List of dependencies for the target.
def register_build(target, command, deps) def register_build(target, command, deps)
@cache[:targets][target] = { @cache[:targets][target.encode(__ENCODING__)] = {
command: command, command: command,
checksum: calculate_checksum(target), checksum: calculate_checksum(target),
deps: deps.map do |dep| deps: deps.map do |dep|
{ {
fname: dep, fname: dep.encode(__ENCODING__),
checksum: lookup_checksum(dep), checksum: lookup_checksum(dep),
} }
end end