BUG: Teach UntarFile to delete dir on error
When tarball extraction fails we should still cleanup the temporary extraction directory. Otherwise the next attempt will create a new directory and the first one will never be removed.
This commit is contained in:
parent
82c081ba35
commit
87434fc38f
|
@ -59,6 +59,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E tar ${args} ${filename}
|
|||
RESULT_VARIABLE rv)
|
||||
|
||||
if(NOT rv EQUAL 0)
|
||||
file(REMOVE_RECURSE "${ut_dir}")
|
||||
message(FATAL_ERROR "error: untar of '${filename}' failed")
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue