aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v5/hub.rb2
-rw-r--r--lib/sisu/v6/hub.rb2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/sisu/v5/hub.rb b/lib/sisu/v5/hub.rb
index eda98084..0e90f21a 100644
--- a/lib/sisu/v5/hub.rb
+++ b/lib/sisu/v5/hub.rb
@@ -266,6 +266,8 @@ module SiSU
rescue
ensure
if FileTest.directory?(@env.processing_path.processing) \
+ and FileTest.directory?(@env.processing_path.processing_base_tmp) \
+ and @env.processing_path.processing_base_tmp =~/#{@env.processing_path.processing}/ \
and @env.processing_path.processing_base_tmp =~/^\/tmp\/\S+/
FileUtils::cd(@env.processing_path.processing_base_tmp) do
FileUtils::rm_rf('.')
diff --git a/lib/sisu/v6/hub.rb b/lib/sisu/v6/hub.rb
index 2558a9db..41f8e930 100644
--- a/lib/sisu/v6/hub.rb
+++ b/lib/sisu/v6/hub.rb
@@ -266,6 +266,8 @@ module SiSU
rescue
ensure
if FileTest.directory?(@env.processing_path.processing) \
+ and FileTest.directory?(@env.processing_path.processing_base_tmp) \
+ and @env.processing_path.processing_base_tmp =~/#{@env.processing_path.processing}/ \
and @env.processing_path.processing_base_tmp =~/^\/tmp\/\S+/
FileUtils::cd(@env.processing_path.processing_base_tmp) do
FileUtils::rm_rf('.')