summaryrefslogtreecommitdiff
path: root/lib/find.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/find.rb')
-rw-r--r--lib/find.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/find.rb b/lib/find.rb
index 3f1b82d2b3..9fb012902c 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -16,8 +16,10 @@ module Find
d = Dir.open(file)
begin
for f in d
- next if f =~ /^\.\.?$/
- if file == "/" then
+ next if f =~ /\A\.\.?\z/
+ if File::ALT_SEPARATOR and file =~ /^([\/\\]|[A-Za-z]:[\/\\]?)$/ then
+ f = file + f
+ elsif file == "/" then
f = "/" + f
else
f = file + "/" + f