mirror of
https://github.com/moby/buildkit.git
synced 2026-08-09 17:18:11 +00:00
Follow-up to 38040ae03e.
Messages returned by fsutil.Stat are guaranteed to return a PathError
wrapped by a stack trace (since it calls os.Lstat). However, as these
error messages are printed, they include the temporary directory for the
mounted reference which is not useful to the caller.
On an error, we can restore the filename in the PathError to the
requested filename, as also seen in os.DirFS.
Signed-off-by: Justin Chadwell <me@jedevc.com>