aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-06-06 18:45:26 +0200
committerAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-06-06 18:48:13 +0200
commiteb308e10967a327d51ce3ada6cadc8b1d25bfa45 (patch)
tree72b8c00b968f13b1d709b28b49fa9383f34fea2e
parent816752499f9b1aed7147bf260c9e9e882974b631 (diff)
downloadpaludis-eb308e10967a327d51ce3ada6cadc8b1d25bfa45.tar.gz
paludis-eb308e10967a327d51ce3ada6cadc8b1d25bfa45.tar.xz
(ruby) find_unmanaged_files.rb: Don't pass an empty string (root) to Find.find
Breaks with Ruby 1.9: pipping@pfirsich ~ $ /usr/share/paludis/ruby/demos/find_unmanaged_files.rb / /usr/lib64/ruby/1.9/find.rb:38:in `block in find': No such file or directory (Errno::ENOENT) from /usr/lib64/ruby/1.9/find.rb:38:in `collect!' from /usr/lib64/ruby/1.9/find.rb:38:in `find' from /usr/share/paludis/ruby/demos/find_unmanaged_files.rb:103:in `<main>'
-rwxr-xr-xruby/demos/find_unmanaged_files.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby/demos/find_unmanaged_files.rb b/ruby/demos/find_unmanaged_files.rb
index 3aac79a..78c8a10 100755
--- a/ruby/demos/find_unmanaged_files.rb
+++ b/ruby/demos/find_unmanaged_files.rb
@@ -78,7 +78,7 @@ end
env = Paludis::EnvironmentFactory.instance.create env_spec
db = env.package_database
-root = env.root[-1] == ?/ ? env.root.chop : env.root
+root = ( env.root.length > 1 && env.root[-1] == ?/ ) ? env.root.chop : env.root
files = []