Fix bug.
This commit is contained in:
parent
c572a51431
commit
119c963d82
|
@ -13,7 +13,9 @@ if bundle_update_flag
|
||||||
default_event_news_widget_info = JSON.parse(File.read("#{app_path}/modules/event_news_mod/info.json"))["widgets"].sort_by{|h| h["filename"].to_i} rescue []
|
default_event_news_widget_info = JSON.parse(File.read("#{app_path}/modules/event_news_mod/info.json"))["widgets"].sort_by{|h| h["filename"].to_i} rescue []
|
||||||
all_template.each do |folder|
|
all_template.each do |folder|
|
||||||
if !folder.include?('mobile')
|
if !folder.include?('mobile')
|
||||||
if Dir.exist?("#{folder}modules/event_news_mod/event_news")
|
if Dir.exist?("#{folder}modules/event_news")
|
||||||
|
Bundler.with_clean_env{system ("cp -rf #{folder}modules/event_news #{folder}modules/event_news_mod && rm -rf #{folder}modules/event_news")}
|
||||||
|
elsif Dir.exist?("#{folder}modules/event_news_mod/event_news")
|
||||||
Bundler.with_clean_env{system ("cp -rf #{folder}modules/event_news_mod/event_news/* #{folder}modules/event_news_mod/. && rm -rf #{folder}modules/event_news_mod/event_news")}
|
Bundler.with_clean_env{system ("cp -rf #{folder}modules/event_news_mod/event_news/* #{folder}modules/event_news_mod/. && rm -rf #{folder}modules/event_news_mod/event_news")}
|
||||||
end
|
end
|
||||||
info_json_file = "#{folder}modules/event_news_mod/info.json"
|
info_json_file = "#{folder}modules/event_news_mod/info.json"
|
||||||
|
|
Loading…
Reference in New Issue