From 9ce34782eea88dbec19e4aca82e4dc4de79cf79f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 29 Mar 2019 16:09:11 -0400 Subject: [PATCH] [unpackfs] Avoid double / at end --- src/modules/unpackfs/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 4d077ce29..d406054d4 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -99,7 +99,8 @@ def file_copy(source, dest, progress_cb): # `source` *must* end with '/' otherwise a directory named after the source # will be created in `dest`: ie if `source` is "/foo/bar" and `dest` is # "/dest", then files will be copied in "/dest/bar". - source += "/" + if not source.endswith("/"): + source += "/" args = ['rsync', '-aHAXr'] args.extend(list_excludes(dest))