aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-09-12 21:14:32 -0400
committerRalph Amissah <ralph@amissah.com>2014-09-12 21:14:32 -0400
commit57f76ceb65f06e21ee340724c4be45bdc78897d9 (patch)
tree437eab838d405122b0999a98173fda2c4014d2df /lib
parentv5 v6: version & changelog (diff)
v5 v6: hub, /tmp processing directory checks
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('.')