lib/big_keeper/util/cache_operator.rb in bigkeeper-0.9.12 vs lib/big_keeper/util/cache_operator.rb in bigkeeper-0.9.13

- old
+ new

@@ -13,10 +13,12 @@ FileUtils.mkdir_p(dest_path) unless File.exist?(dest_path) FileUtils.cp("#{@path}/#{file}", "#{@cache_path}/#{file}"); end def load(file) - FileUtils.cp("#{@cache_path}/#{file}", "#{@path}/#{file}"); + if File.exist?(@cache_path) + FileUtils.cp("#{@cache_path}/#{file}", "#{@path}/#{file}"); + end end def clean if File.exist?(@cache_path) FileUtils.rm_r(@cache_path)