lib/trackman/components/diffable.rb in trackman-0.6.10 vs lib/trackman/components/diffable.rb in trackman-0.6.11
- old
+ new
@@ -25,22 +25,21 @@
end
def define_update local, remote
to_update = local.select do |l|
remote.any? do |r|
- path_eql = a.path == s.path
- hash_eql = a.file_hash == s.file_hash
- vp_eql = a.virtual_path == s.virtual_path
+ path_eql = r.path == l.path
+ hash_eql = r.file_hash == l.file_hash
+ vp_eql = r.virtual_path == l.virtual_path
path_eql && (!hash_eql || !vp_eql)
end
end
to_update.map do |a|
sibling = remote.select{|x| x.path == a.path }.first
a.to_remote(sibling.id)
end
end
-
end
end
end
\ No newline at end of file