projects
/
services
/
jenkins-scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1cc031
)
TPE-487 Fix of attempt to hack rsync failed.
73/163673/1
author
hyokeun
<hyokeun.jeon@samsung.com>
Wed, 13 Dec 2017 01:37:22 +0000
(10:37 +0900)
committer
hyokeun
<hyokeun.jeon@samsung.com>
Wed, 13 Dec 2017 01:37:22 +0000
(10:37 +0900)
Change-Id: Ia3cd57b2972bc9ef6100b9127c47180abbf5c93d
common/utils.py
patch
|
blob
|
history
diff --git
a/common/utils.py
b/common/utils.py
index
13ffc85
..
7130040
100644
(file)
--- a/
common/utils.py
+++ b/
common/utils.py
@@
-138,6
+138,13
@@
def sync(source, destination, remove=True, hardlinks=False):
# Through rsync protocol
if destination.startswith('rsync:'):
+
+ # Cut trailing slash due to error (attempt to hack rsync failed)
+ if os.path.isdir(source):
+ if source.endswith("/"):
+ source = source[:-1]
+ source = "%s/*" % source
+
cmd = "rsync -av --delay-updates %s/ %s" % (source, destination)
try: