This is the same as
e105befbe4ee0d85e94c2048a744f0373e2dbcdf on
additional place in the code.
When a link is pointing to location inaccessible to build user (e.g. "/root/something"),
filepath.is_file() throws "PermissionError: [Errno 13] Permission denied".
Fix this by first checking if it is a link.
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
filenames.sort()
for fn in filenames:
fpath = Path(dirpath) / fn
- if not fpath.is_file() or fpath.is_symlink():
+ if fpath.is_symlink() or not fpath.is_file():
continue
relpath = str(fpath.relative_to(image_rootfs))