~charles/rtm

ef83fb1877eb2932b2c1260c2eccbe7ef0a262a7 — Charles Daniels 1 year, 10 months ago ae0bb9c master
fixed backup enumeration timing out
1 files changed, 7 insertions(+), 1 deletions(-)

M rtm/rtm.py
M rtm/rtm.py => rtm/rtm.py +7 -1
@@ 55,7 55,13 @@ def enumerate_backups(config):

    logging.info("enumerating backups on remote host...")

    command = [ "find", config['destination_path'], "-type", "d", "-iname", "'_rtm_*'"]
    # XXX: there are two ways that this might break in the future:
    #
    # * ls -1 is not safe against adversarial inputs, as it is not
    #   null-delimited
    #
    # * this will break if config['destination_path'] is not a POSIX-style path
    command = [ "ls", "-1", "-d", config['destination_path'] + "/_rtm_*" ]
    backups = run_ssh_command(config, command)

    complete = []