From 2a0cb4dc5692d0751127614953096e3ad2edc74d Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 30 Nov 2021 05:10:34 -0500 Subject: [PATCH] Remove libRack symlink immediately after loading plugin library. --- src/plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugin.cpp b/src/plugin.cpp index 0d5058b8..2f2ac151 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -68,6 +68,9 @@ static void* loadLibrary(std::string libraryPath) { #elif defined ARCH_MAC handle = dlopen(libraryPath.c_str(), RTLD_NOW | RTLD_LOCAL); #endif + if (!settings::devMode) { + system::remove(linkPath); + } if (!handle) throw Exception("Failed to load library %s: %s", libraryPath.c_str(), dlerror()); #endif