build.run: fix BuildProducts.extract to work with subdirectories.
Fixes #353.
This commit is contained in:
parent
7a08901117
commit
91d6e4b22a
|
@ -136,7 +136,8 @@ class BuildProducts(metaclass=ABCMeta):
|
||||||
# On Windows, a named temporary file (as created by Python) is not accessible to
|
# On Windows, a named temporary file (as created by Python) is not accessible to
|
||||||
# others if it's still open within the Python process, so we close it and delete
|
# others if it's still open within the Python process, so we close it and delete
|
||||||
# it manually.
|
# it manually.
|
||||||
file = tempfile.NamedTemporaryFile(prefix="nmigen_", suffix="_" + filename,
|
file = tempfile.NamedTemporaryFile(
|
||||||
|
prefix="nmigen_", suffix="_" + os.path.basename(filename),
|
||||||
delete=False)
|
delete=False)
|
||||||
files.append(file)
|
files.append(file)
|
||||||
file.write(self.get(filename))
|
file.write(self.get(filename))
|
||||||
|
|
Loading…
Reference in a new issue