This works because tempfile::NamedTempFile::persist() deletes the file it's
about to persist to. Maybe we should stat() before we delete, but it's
always going to be a TOCTOU and we don't lock anyways...
We'll rely on this to work in the future when generating delta layers on
top of an existing image+tag.
This works because tempfile::NamedTempFile::persist() deletes the file it's about to persist to. Maybe we should stat() before we delete, but it's always going to be a TOCTOU and we don't lock anyways...
We'll rely on this to work in the future when generating delta layers on top of an existing image+tag.
Signed-off-by: Tycho Andersen tycho@tycho.pizza