schema/migrations/migrate3to4.rb in machinery-tool-1.18.0 vs schema/migrations/migrate3to4.rb in machinery-tool-1.19.0

- old
+ new

@@ -21,19 +21,19 @@ in order to support other file types like links. EOT def migrate ["changed_managed_files", "config_files"].each do |scope| - if @hash.has_key?(scope) - @hash[scope]["files"].each do |file| - next if file["changes"] == ["deleted"] + next unless @hash.key?(scope) - path = File.join(@path, scope, file["name"]) - file["type"] = if File.directory?(path) || path.end_with?("/") - "dir" - else - "file" - end + @hash[scope]["files"].each do |file| + next if file["changes"] == ["deleted"] + + path = File.join(@path, scope, file["name"]) + file["type"] = if File.directory?(path) || path.end_with?("/") + "dir" + else + "file" end end end Dir.glob(File.join(@path, "/changed_managed_files/**/*")).reverse.each do |path|