summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
index 937905ab..a40069d2 100644
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
@@ -148,8 +148,8 @@ cleanexit() {
# kill potential remaining background jobs
kill $(jobs -p)
- # If we're not in debug mode, remove all temporary files
- if ! "$DEBUG" && notempty TMPDIR; then
+ # If we're not in debug mode AND got a clean exit code, remove all temporary files
+ if ! "$DEBUG" && notempty TMPDIR && [ "$1" = "0" ]; then
rm -rf -- "${TMPDIR}"
fi