diff options
author | Igor Böhm <igor@9lab.org> | 2021-10-05 09:27:45 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2021-10-05 09:27:45 +0000 |
commit | a73f41bf4ee5fbee20391922ed56c0310e3ccae9 (patch) | |
tree | 65012657f1c2d723198d129b48cfff5e55995fda /sys/src/cmd/sam | |
parent | 659496081ef3517f09689678c070ad1967bd394e (diff) |
sam: fix spurious overwrite message (patch from plan9port)
Fixes:
% sam -d
-.
w /tmp/foo
/tmp/foo: (new file) #0
w /tmp/foo
?warning: write might change good version of `/tmp/foo'
Diffstat (limited to 'sys/src/cmd/sam')
-rw-r--r-- | sys/src/cmd/sam/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/sam/io.c b/sys/src/cmd/sam/io.c index f995bb7c9..a8ff31c31 100644 --- a/sys/src/cmd/sam/io.c +++ b/sys/src/cmd/sam/io.c @@ -66,7 +66,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; |