Using getSymbolicLink with Folder aliases doesn't work


I somehow can't use folder aliases on OSX to redirect file locations.

This is the code (which works on Windows):

File subDirectory = currentWorkDirectory.getChildFile(getIdentifier(dir));

    return subDirectory;
else if (subDirectory.isSymbolicLink())
    return subDirectory.getLinkedTarget();
    const String fileExtension = subDirectory.getFileExtension();
    return File::nonexistent;

Everytime I use this with a folder alias, the third condition is met and the assertion is hit (with an empty fileExtension).

It works on Windows (with folder shortcuts).

The file (the alias as well as the linked target) clearly exist (otherwise the assertion in line 2 would pop up).


Well, on OSX it just calls the OS function destinationOfSymbolicLinkAtPath.. If you debug it, does that not work for the folder you're giving it? (If it doesn't then I have no idea what else we could do to change it!)


I tried to debug it, but it doesn't show up with something obviously wrong. Anyway, I found a workaround for my case that is even more cross platform friendly (for users running OSX and Bootcamp on the same machine), so I think I'll leave it like this...