aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2019-05-24 16:08:43 -0500
committerGitHub <noreply@github.com>2019-05-24 16:08:43 -0500
commit81d1242c77d74f6c0ca9d52971ccae2581528f1e (patch)
treedeb565001295b69220902608fbf33f9460614039 /activesupport/lib
parent5c14eb0b4ea3bde067bc8fce7ed99f5f10ab16ff (diff)
parent2fd6c3799dd04dcae0948acd25c40dded1459756 (diff)
downloadrails-81d1242c77d74f6c0ca9d52971ccae2581528f1e.tar.gz
rails-81d1242c77d74f6c0ca9d52971ccae2581528f1e.tar.bz2
rails-81d1242c77d74f6c0ca9d52971ccae2581528f1e.zip
Merge pull request #36340 from jhawthorn/evented_file_checker_symlink
Fix EventedFileUpdateChecker through a symlink
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/evented_file_update_checker.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/evented_file_update_checker.rb b/activesupport/lib/active_support/evented_file_update_checker.rb
index 3f6fd58f5e..84caa00b58 100644
--- a/activesupport/lib/active_support/evented_file_update_checker.rb
+++ b/activesupport/lib/active_support/evented_file_update_checker.rb
@@ -107,6 +107,7 @@ module ActiveSupport
private
def boot!
+ normalize_dirs!
Listen.to(*@dtw, &method(:changed)).start
end
@@ -114,6 +115,12 @@ module ActiveSupport
Listen.stop
end
+ def normalize_dirs!
+ @dirs.transform_keys! do |dir|
+ dir.exist? ? dir.realpath : dir
+ end
+ end
+
def changed(modified, added, removed)
unless updated?
@updated.make_true if (modified + added + removed).any? { |f| watching?(f) }