Skip to content

Commit 514fab6

Browse files
authored
Merge pull request #316 from firesim/raghav-g13-patch-1
Update wlutil.py to fix bug in applying overlays with sub-dirs to marshal images (#314)
2 parents d5a8b87 + d937d95 commit 514fab6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wlutil/wlutil.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,9 @@ def copyImgFiles(img, files, direction):
718718
dirsToModify.extend([getOpt('mount-dir') / e for e in reversed(parents)])
719719
dirsToModify.extend([withinMountPath] if withinMountPath.is_dir() else [])
720720
# also ensure that if copying a directory into a mountpoint, that directory can be written in the mountpoint
721-
dirsToModify.extend([cpDstResPath / cpSrcResPath.name] if direction == 'in' and cpSrcResPath.is_dir() else [])
721+
dirsToModify.extend([cpDstResPath / cpSrcResPath.name]
722+
if direction == 'in' and cpSrcResPath.is_dir()
723+
and (cpDstResPath / cpSrcResPath.name).exists() else [])
722724

723725
# remove duplicates but keep order
724726
dirsToModify = list(dict.fromkeys(dirsToModify))

0 commit comments

Comments
 (0)