mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
sam: fix spurious overwrite message
Fixes: % sam -d -. w foo foo: (new file) #0 w foo ?warning: write might change good version of `foo'
This commit is contained in:
parent
8cf52696be
commit
d3ee9f70e4
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue