This commit is contained in:
恍兮惚兮 2024-10-25 11:56:24 +08:00
parent 2c613fd060
commit 81feb86bd0

View File

@ -175,7 +175,7 @@ std::wstring pluginitem::wpath()
{ {
auto wp = StringToWideString(path); auto wp = StringToWideString(path);
if (isref) if (isref)
return std::filesystem::current_path() / wp; return std::filesystem::absolute(wp);
else else
return wp; return wp;
} }
@ -272,7 +272,7 @@ void Pluginmanager::remove(const std::wstring &wss)
auto it = std::remove_if(plgs.begin(), plgs.end(), [&](auto &t) auto it = std::remove_if(plgs.begin(), plgs.end(), [&](auto &t)
{ {
std::string p=t["path"]; std::string p=t["path"];
return p==s; }); return std::filesystem::absolute(p)==std::filesystem::absolute(s); });
plgs.erase(it, plgs.end()); plgs.erase(it, plgs.end());
OnNewSentenceS.erase(wss); OnNewSentenceS.erase(wss);
} }