Merge "Create parent directories before writing to output target files" into main am: 611bbbc49d
Original change: https://android-review.googlesource.com/c/platform/build/+/3255204 Change-Id: Id58a0e5da52a5151e8f42c299a3390c3a28a5967 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -3238,7 +3238,9 @@ class File(object):
|
||||
return t
|
||||
|
||||
def WriteToDir(self, d):
|
||||
with open(os.path.join(d, self.name), "wb") as fp:
|
||||
output_path = os.path.join(d, self.name)
|
||||
os.makedirs(os.path.dirname(output_path), exist_ok=True)
|
||||
with open(output_path, "wb") as fp:
|
||||
fp.write(self.data)
|
||||
|
||||
def AddToZip(self, z, compression=None):
|
||||
|
Reference in New Issue
Block a user