int was_temp = bconfig(fb, BCONFIG_IS_TEMP_FILE, 0);
ASSERT(was_temp == 1);
if (rename(fb->name, name))
- die("Cannot rename %s to %s: %m", fb->name, name);
+ bthrow(fb, "fb.tmp", "Cannot rename %s to %s: %m", fb->name, name);
bclose(fb);
}
die("Hey, whaddya want?");
struct fastbuf *f = bopen_tmp(65536);
+ ASSERT(f && f->name);
bputsn(f, "Hello, world!");
bclose(f);
return 0;