mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add better error handling, correct the location on disk of stylesheet
This commit is contained in:
@@ -8,7 +8,7 @@ class StylesheetsController < ApplicationController
|
||||
digest = "_" + digest if digest
|
||||
|
||||
# Security note, safe due to route constraint
|
||||
location = "#{DiscourseStylesheets::CACHE_PATH}/#{target}#{digest}.css"
|
||||
location = "#{Rails.root}/#{DiscourseStylesheets::CACHE_PATH}/#{target}#{digest}.css"
|
||||
|
||||
unless File.exist?(location)
|
||||
query = StylesheetCache.where(target: target)
|
||||
|
||||
Reference in New Issue
Block a user