Fix rsync backup. The path was not append properly

This commit is contained in:
yodax 2017-04-10 10:33:11 +02:00 committed by Joshua Tauberer
parent 6e04eb490f
commit b66f12dd4c
1 changed files with 5 additions and 4 deletions

View File

@ -399,10 +399,11 @@ def list_target_files(config):
rsync_fn_size_re = re.compile(r'.* ([^ ]*) [^ ]* [^ ]* (.*)')
rsync_target = '{host}:{path}'
if not target.path.endswith('/'):
target_path = target.path + '/'
if target.path.startswith('/'):
target_path = target.path[1:]
target_path = target.path
if not target_path.endswith('/'):
target_path = target_path + '/'
if target_path.startswith('/'):
target_path = target_path[1:]
rsync_command = [ 'rsync',
'-e',