aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/paths.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/paths.rb')
-rw-r--r--railties/lib/rails/paths.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb
index 838fe55acc..0664338e0b 100644
--- a/railties/lib/rails/paths.rb
+++ b/railties/lib/rails/paths.rb
@@ -223,12 +223,10 @@ module Rails
private
def files_in(path)
- Dir.chdir(path) do
- files = Dir.glob(@glob)
- files -= @exclude if @exclude
- files.map! { |file| File.join(path, file) }
- files.sort
- end
+ files = Dir.glob(@glob, base: path)
+ files -= @exclude if @exclude
+ files.map! { |file| File.join(path, file) }
+ files.sort
end
end
end