diff --git a/lib/proxy/http_download.rb b/lib/proxy/http_download.rb index d0df75ea3..90fcc7405 100644 --- a/lib/proxy/http_download.rb +++ b/lib/proxy/http_download.rb @@ -26,7 +26,7 @@ def initialize(src, dst, connect_timeout: DEFAULT_CONNECT_TIMEOUT, verify_server # keep last changed file attribute args << "--remote-time" # only download newer files - args += ["--time-cond", dst.to_s] + args += ["--time-cond", "file", dst.to_s] # print stats in the end args += [ "--write-out", diff --git a/test/http_download_test.rb b/test/http_download_test.rb index d5367d2c6..4e3dbae95 100644 --- a/test/http_download_test.rb +++ b/test/http_download_test.rb @@ -17,7 +17,7 @@ def test_regular_call "--retry-delay", "10", "--max-time", "3600", "--remote-time", - "--time-cond", "dst", + "--time-cond", "file", "dst", "--write-out", "Task done, result: %{http_code}, size downloaded: %{size_download}b, speed: %{speed_download}b/s, time: %{time_total}ms", "--output", "dst", "--location", "src" @@ -34,7 +34,7 @@ def test_regular_call_with_ssl_verify "--retry-delay", "10", "--max-time", "3600", "--remote-time", - "--time-cond", "dst", + "--time-cond", "file", "dst", "--write-out", "Task done, result: %{http_code}, size downloaded: %{size_download}b, speed: %{speed_download}b/s, time: %{time_total}ms", "--output", "dst", "--location", "src"