shared-repo-unpack: move existing dir's contents, not dir itself

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
This commit is contained in:
Joshua Lock 2018-01-24 14:29:51 +00:00
parent c6a0df6db6
commit d3ef90083b

View File

@ -42,7 +42,7 @@ with open(repojson) as f:
if os.path.exists(targetdir):
trashdest = trashdir + "/" + target + "/" + str(int(time.time())) + '-' + str(random.randrange(100, 100000, 2))
utils.mkdir(trashdest)
subprocess.check_call(['mv', targetdir, trashdest])
subprocess.check_call(['mv', targetdir + '/*', trashdest])
for repo in sorted(repos.keys()):
if repo not in needrepos: