lib/uricp/strategy/rbd_cache_clone.rb in uricp-0.0.22 vs lib/uricp/strategy/rbd_cache_clone.rb in uricp-0.0.23
- old
+ new
@@ -13,11 +13,10 @@
end
with_active_cache do
options['cache_name'] = File.basename(options['to_uri'].path)
cache_target = rbd_cache_image_spec(from)
- cache_check = in_rbd_cache(rbd_cache_image_spec(from))
- if cache_check
+ if rbd_cache_image_exists?(cache_target) || in_rbd_cache(cache_target)
debug "#{self.class.name}: Unexpected existing cache entry for #{options['to_uri']}"
unsupported_transfer
end
proposal(cache_target)
end