project-machine / puzzlefs

A next-generation container filesystem
Apache License 2.0
393 stars 17 forks source link

oci: verify putting the same blob twice works #28

Closed tych0 closed 3 years ago

tych0 commented 3 years ago

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