From 31222825490000ba0f669f466f483de7d0d2bc5c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 10 Sep 2019 16:54:22 +0200 Subject: [run-virt] Only wipe TMPDIR on cleanexit 0 --- .../vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc | 4 ++-- 1 file 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 -- cgit v1.2.3-55-g7522