diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-05-24 16:08:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-24 16:08:43 -0500 |
commit | 81d1242c77d74f6c0ca9d52971ccae2581528f1e (patch) | |
tree | deb565001295b69220902608fbf33f9460614039 /activesupport/lib | |
parent | 5c14eb0b4ea3bde067bc8fce7ed99f5f10ab16ff (diff) | |
parent | 2fd6c3799dd04dcae0948acd25c40dded1459756 (diff) | |
download | rails-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.rb | 7 |
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) } |