From 15ae3145ec1e077245b8f9ba46b16359c75482cc Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Sun, 15 Mar 2020 11:01:24 +0000 Subject: [PATCH] FIX: Plugins may have relative symlinks --- lib/stylesheet/watcher.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/stylesheet/watcher.rb b/lib/stylesheet/watcher.rb index 4c9ab7f595c..384f7515d10 100644 --- a/lib/stylesheet/watcher.rb +++ b/lib/stylesheet/watcher.rb @@ -57,7 +57,11 @@ module Stylesheet Thread.new do begin plugins_paths = Dir.glob("#{Rails.root}/plugins/*").map do |file| - File.symlink?(file) ? File.readlink(file) : file + if File.symlink?(file) + File.expand_path(File.readlink(file), "#{Rails.root}/plugins") + else + file + end end.compact listener = Listen.to("#{root}/#{watch}", listener_opts) do |modified, added, _|