mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 08:17:24 +08:00
if we have not automatic assets, don't try deleting them
This commit is contained in:
@ -47,6 +47,8 @@ class Plugin::Instance
|
|||||||
end
|
end
|
||||||
|
|
||||||
def delete_extra_automatic_assets(good_paths)
|
def delete_extra_automatic_assets(good_paths)
|
||||||
|
return unless Dir.exists? auto_generated_path
|
||||||
|
|
||||||
filenames = good_paths.map{|f| File.basename(f)}
|
filenames = good_paths.map{|f| File.basename(f)}
|
||||||
# nuke old files
|
# nuke old files
|
||||||
Dir.foreach(auto_generated_path) do |p|
|
Dir.foreach(auto_generated_path) do |p|
|
||||||
|
Reference in New Issue
Block a user