The sense of the result of FileIsReadOnly seems to be inverted - see attched patch Colin -------------- next part -------------- A non-text attachment was scrubbed... Name: fileread.patch Type: text/x-patch Size: 469 bytes Desc: not available URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20040424/88c1de0e/attachment.bin>