aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-06-06 19:10:33 +0200
committerAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-06-06 19:17:38 +0200
commit99d32c9a80921bbdf13a8d468648461aafdf7bd6 (patch)
tree72b8c00b968f13b1d709b28b49fa9383f34fea2e
parent2c7a59c266f33378fae198df8318f810df47f707 (diff)
downloadpaludis-99d32c9a80921bbdf13a8d468648461aafdf7bd6.tar.gz
paludis-99d32c9a80921bbdf13a8d468648461aafdf7bd6.tar.xz
Revert "(ruby) find_unmanaged_files.rb: Find "not under ${ROOT}" detection"
This reverts commit 2c7a59c266f33378fae198df8318f810df47f707. < dleverton> Ingmar: won't that last commit break if root is /foo and the file is in /foobar ?
-rwxr-xr-xruby/demos/find_unmanaged_files.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ruby/demos/find_unmanaged_files.rb b/ruby/demos/find_unmanaged_files.rb
index e7eab6a..78c8a10 100755
--- a/ruby/demos/find_unmanaged_files.rb
+++ b/ruby/demos/find_unmanaged_files.rb
@@ -91,8 +91,8 @@ else
puts "#{file} is not a directory."
exit 1
end
- unless file == root or file[0,root.length] == root
- puts "#{file} is not under ${ROOT} (#{root})"
+ unless file == root or file[0,root.length + 1] == root + "/"
+ puts "#{file} is not under ${ROOT} (#{root}/)"
exit 1
end
files << (file[-1] == ?/ ? file.chop : file)