This repository was archived by the owner on Aug 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -430,6 +430,7 @@ namespace cqhttp {
430430 HANDLER (set_restart) {
431431 const auto clean_log = params.get_bool (" clean_log" , false );
432432 const auto clean_cache = params.get_bool (" clean_cache" , false );
433+ const auto clean_event = params.get_bool (" clean_event" , false );
433434
434435 auto coolq_exe_path = cq::dir::root ();
435436 if (const auto edition = get_coolq_edition (); edition == " air" ) {
@@ -451,11 +452,14 @@ namespace cqhttp {
451452 f << " del /f /s /q \" " << ansi (utils::fs::data_file_full_path (to_string (self_id), " logv1.db" )) << " \" "
452453 << endl;
453454 }
454- // due to issue #95, we temporarily disable "clean_cache" option
455- // if (clean_cache) {
456- // f << "rmdir /s /q \"" << ansi(utils::fs::data_file_full_path(to_string(self_id), "")) << "\"" <<
457- // endl;
458- // }
455+ if (clean_cache) {
456+ f << " del /f /s /q \" " << ansi (utils::fs::data_file_full_path (to_string (self_id), " cache.db" )) << " \" "
457+ << endl;
458+ }
459+ if (clean_event) {
460+ f << " del /f /s /q \" " << ansi (utils::fs::data_file_full_path (to_string (self_id), " eventv2.db" )) << " \" "
461+ << endl;
462+ }
459463 f << " start \"\" \" " << ansi (coolq_exe_path) << " \" /account " << self_id << endl;
460464 }
461465
You can’t perform that action at this time.
0 commit comments