mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-21 03:02:09 +00:00
Add trailing slash when checking a remote backup. Also check if we actually can read the remote size
This commit is contained in:
parent
6b334d1e07
commit
e069eb9940
@ -101,7 +101,7 @@ def backup_status(env):
|
||||
# onto. Round up since the backup occurs on the night following
|
||||
# when the threshold is met.
|
||||
deleted_in = None
|
||||
if incremental_count > 0 and first_full_size is not None:
|
||||
if incremental_count > 0 and first_full_size is not None and incremental_size > 0:
|
||||
deleted_in = "approx. %d days" % round(config["min_age_in_days"] + (.5 * first_full_size - incremental_size) / (incremental_size/incremental_count) + .5)
|
||||
|
||||
# When will a backup be deleted?
|
||||
@ -369,6 +369,8 @@ def list_target_files(config):
|
||||
|
||||
_, target_host, target_path = config['target'].split('//')
|
||||
target_path = '/' + target_path
|
||||
if not target_path.endswith('/'):
|
||||
target_path += '/'
|
||||
|
||||
rsync_command = [ 'rsync',
|
||||
'-e',
|
||||
|
Loading…
Reference in New Issue
Block a user