X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Ffb-temp.c;h=896870ea11e133033789c59c51096f2eca2b553a;hb=f1149d882df3b1bfd12a33cef49430f559c3e0ee;hp=05fb655b3f65934afa6a1d40c59ad75e6992d20b;hpb=a4fe009d3366b0a3e119713b0ecc7fc0070efdfa;p=libucw.git diff --git a/ucw/fb-temp.c b/ucw/fb-temp.c index 05fb655b..896870ea 100644 --- a/ucw/fb-temp.c +++ b/ucw/fb-temp.c @@ -8,8 +8,8 @@ * of the GNU Lesser General Public License. */ -#include "ucw/lib.h" -#include "ucw/fastbuf.h" +#include +#include #include #include @@ -35,13 +35,13 @@ void bfix_tmp_file(struct fastbuf *fb, const char *name) 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, "tmp", "Cannot rename %s to %s: %m", fb->name, name); bclose(fb); } #ifdef TEST -#include "ucw/getopt.h" +#include int main(int argc, char **argv) {