hi
just thought i'd share this one - took me a bit of head scratching to
figure out, and, seems like a nice little bug somewhere :) i have some
code for creating a directory on an SD card, and, one would think that
the following would work fine (after setting up the volume etc):
---
// create the "directory"
error = VFSDirCreate(volRef, strFileName);
// all ok (either created ok, or, already exists)?
if ((error == errNone) ||
(error == vfsErrFileAlreadyExists))
{
...
}
---
creating a directory that doesn't exist = no problems :) works like
a charm.. however, trying to create a directory that already exists,
i would assume that it would at least return "vfsErrFileAlreadyExists"
but, instead, it was equal to "vfsErrFileGeneric"!
adding:
---
(error == vfsErrFileGeneric) ||
---
fixes the problem..
now, this means either the VFSDirCreate function is returning a bad
value (ie: should return vfsErrFileAlreadyExists!!) or, i am just
going mad and i need a coffee badly (it is only 2:30pm) maybe a bug,
maybe not :) but, surely, the error code i am getting is not "nice"
(logically) :P what does "a generic file error" really refer to? :P
header file i am using is "VFSMgr.h" - Release: Palm OS SDK 4.0 (63220)
thankfully, its an internal use only app :) and, it works now.
// az
[EMAIL PROTECTED]
http://www.ardiri.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/