MacOS – way to get Mavericks to mount AFP URLs the old way, by mounting the share point, and not the enclosing folder

afpmacosmounturl

Before Mavericks, if I clicked this URL or pasted it into the Finder's Connect to Server dialog:

afp://server.example.com/Share/Path/To/Folder/File.txt

The server's "Share" share point would mount as a volume, and the Finder would open a window navigated to "Folder", with "File.txt" selected. We used this methodology to share file server URLs around the office all of the time.

After we installed Mavericks on the clients (keeping 10.8.x on the OS X Server), whenever a client uses such a URL to locate file, a new volume mounts, named after the enclosing folder, meaning a mount point names "Folder" mounts.

Unfortunately, this means for every URL referencing a different directory, new mount points and server connections are made.

Some have reported the issue and it's been declared as working as designed, but Apple hinted that there is now an option being set that changes this, but unfortunately not supplying how to change that option.

Has anyone by chance figured out a way?

Best Answer

I haven't found a way to configure Finder to behave the old way, so I wrote an Apple Script to mimic the old behavior. The script handles AFP URLs (as well as FTP and CIFS/SMB if you like), mounts the server under the share name and opens a Finder window at the indicated location.

You can set your browser and maybe other programs to open AFP URLs with this script. I don't know if you can convince the Finder though.

Basically the script decomposes the URL into protocol, server name, share name, path and target. It does some basic checks on the URL, mounts the resource under the share name and shows it in Finder.

I bundled it as an application, called URL Handler. You can download and try it out, whether it works for you. The source is included in the disk image, if you want to have a closer look.