diff --git a/app/services/shixuns/create_shixun_service.rb b/app/services/shixuns/create_shixun_service.rb index 2a350fd5d..0594f623a 100644 --- a/app/services/shixuns/create_shixun_service.rb +++ b/app/services/shixuns/create_shixun_service.rb @@ -42,6 +42,12 @@ class CreateShixunService < ApplicationService if !Laboratory.current.main_site? Laboratory.current.laboratory_shixuns.create!(shixun: shixun, ownership: true) end + # 如果是jupyter,先创建一个目录,为了挂载 + if shixun.is_jupyter? + folder = edu_setting('shixun_folder') + path = "#{folder}/#{identifier}" + FileUtils.mkdir_p(path, :mode => 0777) unless File.directory?(dir) + end return shixun end rescue => e