Files added to an externally stored container appear as still in use by FileMaker process
OS X 10.7.4
When adding a file to a container stored externally, NOT as a reference, the file continues to be reported as in use by the FileMaker process. As it appears to be in use, it cannot be overwritten or deleted. This impacts scripts that save as PDF to a temp path, insert the new PDF into a container, and then attempt to modify the existing PDF (such as append).
1. Create a file with a single container field (using standard storage) and one record.
2. Save as PDF to the desktop, naming as "Untitled.PDF"
3. Insert the new file into the container field (DO NOT use "store as reference")
4. Try Save as PDF again, overwriting the existing "Untitled.PDF" file (this should work)
5. In field options, change the storage of the container field to secure external storage
6. Clear the container field again, and re-add the Untitled.PDF file to the container (again, NOT as a reference)
7. Try Save as PDF again, overwriting the existing file on the desktop
As with the first test (when the container used standard storage), the Save as PDF should succeed and overwrite the file on the desktop
You receive an error telling you to use a different name or path. Using the Terminal command
lsof | greg Untitled.PDF
shows that the file is in use by FileMaker.
“Untitled.pdf” could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk.
This did not appear to be happening in FileMaker 12.0v1
Adding another file to the field on a different record "releases" the original file that appears in use.