Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > Carbon > File Management >

Allocate and Disk Full Error


Q: When my application attempts to save a document onto some AFP volumes, it reports that the document could not be saved because the disk was full, even though there's plenty of free space. (In fact, Finder displays a size for the volume that is much larger than it should be, but I've seen servers play this kind of trick before, and it hasn't caused any problems like this.) Further investigation shows that my app's call to Allocate is failing. Why?

A: AFP servers do not implement Allocate; the AppleShare client does. It decides whether the Allocate call should succeed or fail based on the space available on the disk. Some versions of some third-party AFP servers erroneously report the space available in such a way as to confuse AppleShare client into failing the request. Many calls to Allocate are done for the sake of optimization only. If this is the case for your code, simply ignore the return value of Allocate and continue saving the document. If not, the best action for you to take may be to recommend to your users that they upgrade their AFP server to a later version which does not have this bug.

[Jul 21 1999]