mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 17:01:09 +08:00
FIX: Plugins may have relative symlinks
This commit is contained in:
@ -57,7 +57,11 @@ module Stylesheet
|
|||||||
Thread.new do
|
Thread.new do
|
||||||
begin
|
begin
|
||||||
plugins_paths = Dir.glob("#{Rails.root}/plugins/*").map do |file|
|
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
|
end.compact
|
||||||
|
|
||||||
listener = Listen.to("#{root}/#{watch}", listener_opts) do |modified, added, _|
|
listener = Listen.to("#{root}/#{watch}", listener_opts) do |modified, added, _|
|
||||||
|
Reference in New Issue
Block a user