1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

Support unusual filenames in "osc add <directory>"

This way, we can also support directories/files that contain
a newline "\n" etc.
This commit is contained in:
Marcus Huewe 2017-10-10 16:13:59 +02:00
parent c3ba1fbf63
commit a5c7611aee

View File

@ -6977,9 +6977,9 @@ def addFiles(filenames, prj_obj = None):
for p, dirnames, fnames in os.walk(filename, followlinks=False)
for elm in dirnames + fnames]
with open(archive, 'w') as f:
cpio_proc = subprocess.Popen(['cpio', '-o', '-H', 'newc'],
cpio_proc = subprocess.Popen(['cpio', '-o', '-H', 'newc', '-0'],
stdin=subprocess.PIPE, stdout=f)
cpio_proc.communicate('\n'.join(todo))
cpio_proc.communicate('\0'.join(todo))
pacs.extend(findpacs([archive]))
for pac in pacs: