Changed assemble_from_fragments to use os.path.join (#24909)

Fixes #19437
This commit is contained in:
pdasilva 2017-05-22 15:38:11 -07:00 committed by Matt Davis
commit f8e47e2204
2 changed files with 13 additions and 4 deletions

View file

@ -142,7 +142,7 @@ def assemble_from_fragments(src_path, delimiter=None, compiled_regexp=None, igno
for f in sorted(os.listdir(src_path)):
if compiled_regexp and not compiled_regexp.search(f):
continue
fragment = u"%s/%s" % (src_path, f)
fragment = os.path.join(src_path, f)
if not os.path.isfile(fragment) or (ignore_hidden and os.path.basename(fragment).startswith('.')):
continue
fragment_content = open(fragment, 'rb').read()