File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,16 @@ void Loader::Impl::createDirectories() {
74
74
}
75
75
}
76
76
77
+ void Loader::Impl::removeDirectories () {
78
+ // clean up of stale data from Geode v2
79
+ if (std::filesystem::exists (dirs::getGeodeDir () / " index" )) {
80
+ std::thread ([] {
81
+ std::error_code ec;
82
+ std::filesystem::remove_all (dirs::getGeodeDir () / " index" , ec);
83
+ }).detach ();
84
+ }
85
+ }
86
+
77
87
Result<> Loader::Impl::setup () {
78
88
if (m_isSetup) {
79
89
return Ok ();
@@ -105,6 +115,7 @@ Result<> Loader::Impl::setup() {
105
115
{
106
116
log::NestScope nest;
107
117
this ->createDirectories ();
118
+ this ->removeDirectories ();
108
119
this ->addSearchPaths ();
109
120
}
110
121
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ namespace geode {
79
79
~Impl ();
80
80
81
81
void createDirectories ();
82
+ void removeDirectories ();
82
83
83
84
void updateModResources (Mod* mod);
84
85
void addSearchPaths ();
You can’t perform that action at this time.
0 commit comments