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'
This commit is contained in:
parent
659496081e
commit
a73f41bf4e
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ writef(File *f)
|
||||||
warn(Wnotnewline);
|
warn(Wnotnewline);
|
||||||
closeio(n);
|
closeio(n);
|
||||||
if(f->name.s[0]==0 || samename){
|
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->dev = dev;
|
||||||
f->qidpath = qid;
|
f->qidpath = qid;
|
||||||
f->mtime = mtime;
|
f->mtime = mtime;
|
||||||
|
|
Loading…
Reference in a new issue