Browse Source

Fix loading Mac VST bundles with path terminating in slash

tags/1.9.8
falkTX 7 years ago
parent
commit
d203aa7bab
2 changed files with 5 additions and 2 deletions
  1. +4
    -1
      source/backend/plugin/CarlaPluginVST2.cpp
  2. +1
    -1
      source/discovery/carla-discovery.cpp

+ 4
- 1
source/backend/plugin/CarlaPluginVST2.cpp View File

@@ -2099,7 +2099,10 @@ public:
VST_Function vstFn; VST_Function vstFn;


#ifdef CARLA_OS_MAC #ifdef CARLA_OS_MAC
if (CarlaString(filename).toLower().endsWith(".vst"))
CarlaString filenameCheck(filename);
filenameCheck.toLower();

if (filenameCheck.endsWith(".vst") || filenameCheck.endsWith(".vst/"))
{ {
// FIXME assert returns, set engine error // FIXME assert returns, set engine error
const CFURLRef urlRef = CFURLCreateFromFileSystemRepresentation(0, (const UInt8*)filename, (CFIndex)strlen(filename), true); const CFURLRef urlRef = CFURLCreateFromFileSystemRepresentation(0, (const UInt8*)filename, (CFIndex)strlen(filename), true);


+ 1
- 1
source/discovery/carla-discovery.cpp View File

@@ -1650,7 +1650,7 @@ int main(int argc, char* argv[])
return 0; return 0;
} }
#ifdef CARLA_OS_MAC #ifdef CARLA_OS_MAC
if (type == PLUGIN_VST2 && filenameCheck.endsWith(".vst"))
if (type == PLUGIN_VST2 && (filenameCheck.endsWith(".vst") || filenameCheck.endsWith(".vst/")))
openLib = false; openLib = false;
#endif #endif
} }


Loading…
Cancel
Save