summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/fileutils.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 8a1b8a826b..1140dd817b 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1300,7 +1300,8 @@ module FileUtils
.reject {|n| n == '.' or n == '..' }
end
- files.map {|n| Entry_.new(prefix(), join(rel(), n.untaint)) }
+ untaint = RUBY_VERSION < '2.7'
+ files.map {|n| Entry_.new(prefix(), join(rel(), untaint ? n.untaint : n)) }
end
def stat