Skip to content

Commit e6ea8d1

Browse files
authored
Merge pull request #15 from p0nce/no-path-on-osx
Fix returning no path in OSX carbon path
2 parents ede5361 + 1ca8b65 commit e6ea8d1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/standardpaths.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,9 +909,15 @@ version(Windows) {
909909
{
910910
enum carbonPath = "CoreServices.framework/Versions/A/CoreServices\0";
911911

912+
// This one still work as of macOS 15.1, it was used in Dplug for a good while
913+
enum carbonPath2 = "/System/Library/Frameworks/CoreServices.framework/CoreServices\0";
914+
912915
import core.sys.posix.dlfcn;
913916

914917
void* handle = dlopen(carbonPath.ptr, RTLD_NOW | RTLD_LOCAL);
918+
if (!handle)
919+
handle = dlopen(carbonPath2.ptr, RTLD_NOW | RTLD_LOCAL);
920+
915921
if (handle) {
916922
ptrFSFindFolder = cast(typeof(ptrFSFindFolder))dlsym(handle, "FSFindFolder");
917923
ptrFSRefMakePath = cast(typeof(ptrFSRefMakePath))dlsym(handle, "FSRefMakePath");

0 commit comments

Comments
 (0)