aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-06-06 18:55:08 +0200
committerAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-06-06 18:55:08 +0200
commit2c7a59c266f33378fae198df8318f810df47f707 (patch)
tree5aa1439e254fab838e3d91861b60449601b43d4a
parenteb308e10967a327d51ce3ada6cadc8b1d25bfa45 (diff)
downloadpaludis-2c7a59c266f33378fae198df8318f810df47f707.tar.gz
paludis-2c7a59c266f33378fae198df8318f810df47f707.tar.xz
(ruby) find_unmanaged_files.rb: Find "not under ${ROOT}" detection
-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 78c8a10..e7eab6a 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 + 1] == root + "/"
- puts "#{file} is not under ${ROOT} (#{root}/)"
+ unless file == root or file[0,root.length] == root
+ puts "#{file} is not under ${ROOT} (#{root})"
exit 1
end
files << (file[-1] == ?/ ? file.chop : file)