FIX: Plugins may have relative symlinks

This commit is contained in:
Daniel Waterworth 2020-03-15 11:01:24 +00:00
parent a1d660d951
commit 15ae3145ec
1 changed files with 5 additions and 1 deletions

View File

@ -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, _|