mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
acme: report close failure during Put
This commit is contained in:
parent
4af8158b53
commit
0b349f6f34
1 changed files with 6 additions and 2 deletions
|
@ -699,7 +699,7 @@ putfile(File *f, int q0, int q1, Rune *namer, int nname)
|
|||
Rune *r;
|
||||
Biobuf *b;
|
||||
char *s, *name;
|
||||
int i, fd, q;
|
||||
int i, fd, q, ret;
|
||||
Dir *d, *d1;
|
||||
Window *w;
|
||||
int isapp;
|
||||
|
@ -762,9 +762,13 @@ putfile(File *f, int q0, int q1, Rune *namer, int nname)
|
|||
warning(nil, "can't write file %s: %r\n", name);
|
||||
goto Rescue2;
|
||||
}
|
||||
Bterm(b);
|
||||
ret = Bterm(b);
|
||||
free(b);
|
||||
b = nil;
|
||||
if(ret < 0) {
|
||||
warning(nil, "can't write file %s: %r\n", name);
|
||||
goto Rescue2; // flush or close failed
|
||||
}
|
||||
if(runeeq(namer, nname, f->name, f->nname)){
|
||||
if(q0!=0 || q1!=f->b.nc){
|
||||
f->mod = TRUE;
|
||||
|
|
Loading…
Reference in a new issue