pilot-link
pilot-link copied to clipboard
Open file with vfsModeWrite causes read-only error with dlp_VFSFileWrite()
pi_buffer_t *buf;
// fill buf ...
FileRef fileRef;
dlp_VFSFileOpen(sd, volRef, path, vfsModeWrite, &fileRef);
PI_ERR piErr = dlp_VFSFileWrite(sd, fileRef, buf->data, buf->used);
if (piErr == PI_ERR_DLP_PALMOS)
printf("PalmOS error: %d.\n", pi_palmos_error(sd));
Result:
PalmOS error: 10757 // vfsErrFilePermissionDenied = The file is read only
Current workaround: use vfsModeReadWrite instead vfsModeWrite.