Get ( DocumentsPath ) points to wrong volume
Operating system version
Description of the issue
It looks like files can be saved to the wrong volume using Get ( DocumentsPath ) if a volume named "Users" is mounted.
I have a FileMaker Pro solution that exports a PDF. It uses Get ( DocumentsPath ) to construct a file path that ultimately looks something like filemac:///Macintosh HD/Users/john/Documents. With a volume mounted named "Users" that also contains a folder named "john" and a folder named "Documents", a file created by FileMaker Pro and saved using this path will save into the mounted volume, rather than the local hard disk.
If the file path were "filemac://Volumes/Users/john/Documents" then I wouldn't be surprised. But with the file path specifically indicating "/Macintosh HD" I would expect things to go to the local disk.
I suspect this is related to a bug I've encountered and reported before to Apple (radar 7865595) which has been fixed in the Finder in Yosemite. But it looks like maybe this runs a little deeper and has something to do with the way "Macintosh HD" is mounted and linked. And I wonder if FileMaker Pro isn't ultimately doing the same thing that Finder was when it was misbehaving.
As with the Finder bug, this is reproducible using a disk image named 'Users'.
Steps to reproduce the problem
I'm attaching a disk image and an fmp12 file to demonstrate: https://www.dropbox.com/s/yaqojhtxfy731qz/Get%20DocumentsPath%20Bug%20Demo.zip?dl=0
1. Mount the attached disk image, creating a mounted volume named 'Users'.
2. In the mounted volume, change the 'your-username' folder to match your local home folder's name. For example, if your local home directory is named 'bob', change 'your-username' to 'bob'.
3. Open the .fmp12 file and click the "Save file…" button.
A file called "demo.pdf" should appear on your local hard disk, in your home folder, in the Documents folder.
The file appears on the mounted volume instead.
Unmount any volumes named 'Users'. I can't find a way to work around this at all.