Skip to content
Tcl Source Code View Ticket
Login

View Ticket

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
apnadkarniplain2023-09-27 11:49:12
Fixed in [a6c30811c9]
Log in (anonymous is fine) to add a comment.