Skip to content

Commit

Permalink
Support unusual filenames in "osc add <directory>"
Browse files Browse the repository at this point in the history
This way, we can also support directories/files that contain
a newline "\n" etc.
  • Loading branch information
marcus-h committed Oct 10, 2017
1 parent c3ba1fb commit a5c7611
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a5c7611

Please sign in to comment.