Resolving Aliases on Yosemite

So, I’ve run into an issue with one of my applications running on Yosemite and that’s to do with the way how Aliases are resolved. Or rather under Yosemite, they’re not.

They’re valid Aliases as double clicking them in the Finder, resolves to the correct file. However when using the code.

f = f.parent.child( f.name)

it continues to point to the Alias and not the file at the end of the Alias.

Anyone got a quick workaround for this, do I need to Feedback it?

hmm… It seems like it may be more complicated than I first thought, as this method works for some system Aliases!

So it seems that Aliases created by the user are not resolvable in Xojo code. Relative links work fine, just not Alias files.

Logged it on Feedback and included some code to work around it.
<https://xojo.com/issue/36059>

it would be nice to know what happened. This is so a basic feature of folderitem class, that I would love to see it fixed soon.
Maybe Apple disabled some older deprecated API and Xojo is not yet using the newer APIs?

Could well be, hopefully @Joe Ranieri can enlighten us?

I may be speaking out of turn but I know that the FSRef may still be used by Xojo yet that’s deprecated in favor of CFURL. That caused problems using FolderItem with Mavericks (maybe Yosemite) on MacOS Standard volumes (Apple bug, not sure if they’ve ever addressed it). But basically it;s the FSRef->CFURL transition that seems to be the critical one.

Again, Joe R is gonna know the facts there, anxious to know…

Well, they only went out of favor once I had modernized all of our code to be using FSRefs instead of FSSpecs :).

They did.

I don’t think it’s a huge deal yet. I’m on “vacation” now, so I’ll look at the alias bug at some later point. Feel free to bump this thread next week.

Sounds like Apple :wink:

You may be right, I only discovered it because a customer reported the issue and that function in our application uses Aliases, I’ve since patched it, so I’m okay. The only other place it’ll cause issues is when our apps open files (open dialog or drag and drop) as we check to see if it’s an alias and then resolve it. Again now that there’s replacement code, it just means a few small changes and re-compiling.

I hope that you have a great time, hey WTF are you doing here! Go back to enjoying yourself man!