WRITE does not update file size (EOF position) #552
Labels
CC.resolved
Issue with CureCode status built, tested or complete
Datatype: file!
Datatype: port!
Oldes.resolved
Bugs/wishes with Oldes' fixes/features
Status.important
Test.written
Type.bug
Submitted by: Steeve
If you open a file port and then change the data in the file, READ will only see changes to the data that are before what the end of file position was when the port was opened. Any data that is added on after the end of file, READ won't see. The end-of-file position that is used by READ is not getting updated on WRITE.
It doesn't matter if the port is opened in /seek mode or not, nor does it matter whether you use READ and WRITE or INSERT, APPEND and COPY. If you read data from the same file with a different port, whether or not the original port is still open, the new data is there.
Imported from: CureCode [ Version: alpha 31 Type: Bug Platform: All Category: n/a Reproduce: Always Fixed-in:alpha 55 ]
Imported from: metaeducation#552
Comments:
Submitted by: BrianH
This bug is confirmed by my testing. It seems like a simple fix.
Submitted by: Steeve
you can notice that even doing a query on the port after the append
we don't have the new length.
Submitted by: RobertS
Submitted by: BrianH
WRITE in R3 returns the port you are writing to, in case you want to write something else to it.
Or in the case of HTTP posts, WRITE returns the return data.
The text was updated successfully, but these errors were encountered: