From 020150ecd23e3c77b714627976aebec3d2f11135 Mon Sep 17 00:00:00 2001 From: Bohung Date: Thu, 17 Mar 2022 15:34:21 +0800 Subject: [PATCH] Fix bug. --- event_news_mod.gemspec | 2 +- lib/event_news_mod/engine.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/event_news_mod.gemspec b/event_news_mod.gemspec index 7ee402d..8bdca95 100644 --- a/event_news_mod.gemspec +++ b/event_news_mod.gemspec @@ -14,7 +14,7 @@ if bundle_update_flag all_template.each do |folder| if !folder.include?('mobile') if Dir.exist?("#{folder}modules/event_news_mod/event_news") - Bundler.with_clean_env{system ("mv -f #{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 info_json_file = "#{folder}modules/event_news_mod/info.json" if File.exist?(info_json_file) diff --git a/lib/event_news_mod/engine.rb b/lib/event_news_mod/engine.rb index 5e6d810..d24b6ca 100644 --- a/lib/event_news_mod/engine.rb +++ b/lib/event_news_mod/engine.rb @@ -104,7 +104,7 @@ module EventNewsMod template_path = Rails.root.to_s + '/app/templates' all_template = Dir.glob(template_path+'/*/') all_template.each do |folder| - Bundler.with_clean_env{system ("mkdir -p #{folder}modules/event_news_mod; mv -f #{folder}modules/event_news/* #{folder}modules/event_news_mod/.")} + Bundler.with_clean_env{system ("mkdir -p #{folder}modules/event_news_mod; cp -rf #{folder}modules/event_news/* #{folder}modules/event_news_mod/. && rm -rf #{folder}modules/event_news_mod/event_news")} end end module_label "event_news.event_news"