1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-21 03:02:09 +00:00

Merge pull request #2 from yodax/backup

Add trailing slash when checking a remote backup.
This commit is contained in:
guyzmo 2016-07-30 15:23:35 +02:00 committed by GitHub
commit 5139419b5a

View File

@ -101,7 +101,7 @@ def backup_status(env):
# onto. Round up since the backup occurs on the night following # onto. Round up since the backup occurs on the night following
# when the threshold is met. # when the threshold is met.
deleted_in = None 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) 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? # When will a backup be deleted?
@ -369,6 +369,8 @@ def list_target_files(config):
_, target_host, target_path = config['target'].split('//') _, target_host, target_path = config['target'].split('//')
target_path = '/' + target_path target_path = '/' + target_path
if not target_path.endswith('/'):
target_path += '/'
rsync_command = [ 'rsync', rsync_command = [ 'rsync',
'-e', '-e',