Opening a zipfs file in mode r+ truncates at position of last write
Closed / Fixedf91ee30d335fcae5ad075155d2bf63423fb8b0adCreated 3 years agoUpdated 3 years ago
Descriptionmarkdown2023-09-26 09:11:51
In the sample below, the read at the end should be same as the first except for replacing the first t with an X. Instead the file is truncated at the trailing end of the last write.
% zipfs mount ../tests/zipfiles/test.zip /mt
% set fd [open //zipfs:/mt/test r]
zipfs_37_1
% read $fd
test
% close $fd
% set fd [open //zipfs:/mt/test r+]
zipfs_37_2
% puts -nonewline $fd X
% close $fd
% set fd [open //zipfs:/mt/test r]
zipfs_0_3
% read $fd
X
% close $fd
Referenced by4
7e51dd06e2Merge [a7bd45f8711fd374]: Fix [00018ec7a0], [f91ee30d33], [23dd83ce7c] - zipfs r+, w+ modes, zero byte allocation. check-in2024-08-22 15:10:15a7bd45f871Merge 8.7 - Fix [00018ec7a0], [f91ee30d33], [23dd83ce7c] - zipfs r+, w+ modes, zero byte allocation check-in2023-09-27 11:44:06a6c30811c9Fix [00018ec7a0], [f91ee30d33], [23dd83ce7c] - zipfs r+, w+ modes, zero byte allocation check-in2023-09-27 11:11:53074e370466Tests for bug [f91ee30d33] check-in2023-09-27 06:57:03
apnadkarniplain2023-09-27 11:49:12
Fixed in [a6c30811c9]
Log in (anonymous is fine) to add a comment.