Check that required directories exist when Panda starts.
This commit is contained in:
Родитель
3080e017b1
Коммит
d5a2e97694
|
@ -54,6 +54,8 @@ Merb::BootLoader.after_app_loads do
|
|||
else
|
||||
raise RuntimeError, "You have specified an invalid videos_store configuration option. Valid options are :s3 and :filesystem"
|
||||
end
|
||||
|
||||
LocalStore.ensure_directories_exist
|
||||
end
|
||||
|
||||
EMAIL_SENDER = "Panda <info@pandastream.com>"
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
module LocalStore
|
||||
|
||||
def self.ensure_directories_exist
|
||||
private_dir = Panda::Config[:private_tmp_path]
|
||||
public_dir = Panda::Config[:public_tmp_path]
|
||||
|
||||
FileUtils.mkdir_p(private_dir)
|
||||
FileUtils.mkdir_p(public_dir)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# This path can be accessible from the web
|
||||
|
|
Загрузка…
Ссылка в новой задаче