fixed problem removing temp directories in all circumstances

This commit is contained in:
Nathaniel Landau
2015-01-08 20:34:28 -05:00
parent 8426b0c0f5
commit cf7047877b

View File

@@ -20,11 +20,9 @@
# Usage: Add this function at the end of every script # Usage: Add this function at the end of every script
function safeExit() { function safeExit() {
# Delete temp files, if any # Delete temp files, if any
if is_not_empty "${tmpDir}"; then
if is_dir "${tmpDir}"; then if is_dir "${tmpDir}"; then
rm -r "${tmpDir}" rm -r "${tmpDir}"
fi fi
fi
trap - INT TERM EXIT trap - INT TERM EXIT
exit exit
} }