plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit d3ee9f70e4ee00bd12557910c9e3dcc1fabd53c7
parent 8cf52696bed986f8914f214768690d6ca47bae76
Author: Russ Cox <rsc@swtch.com>
Date:   Thu, 30 Sep 2021 08:44:00 -0400

sam: fix spurious overwrite message

Fixes:

% sam -d
 -.
w foo
foo: (new file) #0
w foo
?warning: write might change good version of `foo'

Diffstat:
Msrc/cmd/sam/io.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cmd/sam/io.c b/src/cmd/sam/io.c @@ -63,7 +63,7 @@ writef(File *f) warn(Wnotnewline); closeio(n); if(f->name.s[0]==0 || samename){ - if(statfile(name, &dev, &qid, &mtime, 0, 0) > 0){ + if(statfile(genc, &dev, &qid, &mtime, 0, 0) > 0){ f->dev = dev; f->qidpath = qid; f->mtime = mtime;