mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 14:10:45 +08:00
sub space for underscore in 'name' when registering public folder in plugin
This commit is contained in:
parent
8c29ed870e
commit
c281dd2c1e
|
@ -177,7 +177,7 @@ class Plugin::Instance
|
||||||
if Dir.exists?(public_data)
|
if Dir.exists?(public_data)
|
||||||
target = Rails.root.to_s + "/public/plugins/"
|
target = Rails.root.to_s + "/public/plugins/"
|
||||||
`mkdir -p #{target}`
|
`mkdir -p #{target}`
|
||||||
target << name
|
target << name.gsub(/\s/,"_")
|
||||||
# TODO a cleaner way of registering and unregistering
|
# TODO a cleaner way of registering and unregistering
|
||||||
`rm -f #{target}`
|
`rm -f #{target}`
|
||||||
`ln -s #{public_data} #{target}`
|
`ln -s #{public_data} #{target}`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user