diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-09-12 21:14:32 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-09-12 21:14:32 -0400 |
commit | 57f76ceb65f06e21ee340724c4be45bdc78897d9 (patch) | |
tree | 437eab838d405122b0999a98173fda2c4014d2df /lib | |
parent | v5 v6: version & changelog (diff) |
v5 v6: hub, /tmp processing directory checks
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v5/hub.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v6/hub.rb | 2 |
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('.') |