3 ms·
Why would cropping alter the file in-place? That would presumably leave the image corrupted if (say) your phone died during the cropping process; it would seem
by jasonhansel 4y ago
Why would cropping alter the file in-place? That would presumably leave the image corrupted if (say) your phone died during the cropping process; it would seem much better to save the cropped image separately and then overwrite the original file atomically. After all, it's the same amount of data to write either way.
- ledauphin 4y agothis comment should be higher. atomic move semantics are the single thing that makes writing basic filesystem interactions plausibly deterministic. anything else is just pretending that errors never happen.