pengutronix / genimage

tool to generate multiple filesystem and flash images from a tree
GNU General Public License v2.0
298 stars 107 forks source link

genimage: improve tmppath handling #239

Closed michaelolbrich closed 4 months ago

michaelolbrich commented 5 months ago

Right now cleanup is partially broken: If the tmppath exists, then its content is removed at the end as expected. However, if the tmppath is missing then it is created but nothing is removed.

Change this to remove the directory including its content at the end when the directory was created but stick to removing just the content if the directory existed before genimage was called.

Fixes: #237