hyprpm: don't copy .so if file doesn't exist

ref #4926
This commit is contained in:
Vaxry 2024-03-02 19:06:09 +00:00
parent d2289d8327
commit 328ab43165

View file

@ -50,7 +50,8 @@ void DataState::addNewPluginRepo(const SPluginRepository& repo) {
}; };
for (auto& p : repo.plugins) { for (auto& p : repo.plugins) {
// copy .so to the good place // copy .so to the good place
std::filesystem::copy_file(p.filename, PATH + "/" + p.name + ".so"); if (std::filesystem::exists(p.filename))
std::filesystem::copy_file(p.filename, PATH + "/" + p.name + ".so");
DATA.emplace(p.name, toml::table{ DATA.emplace(p.name, toml::table{
{"filename", p.name + ".so"}, {"filename", p.name + ".so"},