Only replace local file is smaller in size
This commit is contained in:
@@ -71,11 +71,11 @@ class Worker:
|
||||
try:
|
||||
if job.local_path.is_file():
|
||||
local_size = job.local_path.stat().st_size
|
||||
if local_size == job.box_item.size:
|
||||
if local_size >= job.box_item.size:
|
||||
logging.info('Skipping file [%s], already exists', job.remote_path)
|
||||
return
|
||||
logging.warning(
|
||||
'Downloading file [%s], due to different size (%s | %s)',
|
||||
'Downloading file [%s], due local file being smaller (Remote: %s | Local: %s)',
|
||||
job.remote_path,
|
||||
human_readable_bytes(job.box_item.size),
|
||||
human_readable_bytes(local_size))
|
||||
|
||||
Reference in New Issue
Block a user