diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-17 14:28:53 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-17 14:28:53 +0000 |
commit | cb448fe01bbe75ef31c3190e8b63b0e1a320ffb4 (patch) | |
tree | 9757477193c1b8f3be9a772cabfb1ef92639240e /networking | |
parent | ffae845cfd0a0b9872827d806984841d4cfee104 (diff) | |
download | busybox-w32-cb448fe01bbe75ef31c3190e8b63b0e1a320ffb4.tar.gz busybox-w32-cb448fe01bbe75ef31c3190e8b63b0e1a320ffb4.tar.bz2 busybox-w32-cb448fe01bbe75ef31c3190e8b63b0e1a320ffb4.zip |
libbb: introduce and use xrename and rename_or_warn.
Diffstat (limited to 'networking')
-rw-r--r-- | networking/sendmail.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/networking/sendmail.c b/networking/sendmail.c index fa995abf4..b2fbc5a7a 100644 --- a/networking/sendmail.c +++ b/networking/sendmail.c | |||
@@ -512,10 +512,7 @@ int sendgetmail_main(int argc, char **argv) | |||
512 | if (fd < 0) | 512 | if (fd < 0) |
513 | bb_perror_msg_and_die("cannot create unique file"); | 513 | bb_perror_msg_and_die("cannot create unique file"); |
514 | close(fd); | 514 | close(fd); |
515 | if (rename(tmp_name, new_name) < 0) { | 515 | xrename(tmp_name, new_name); |
516 | // something is very wrong | ||
517 | bb_perror_msg_and_die("cannot move %s to %s", tmp_name, new_name); | ||
518 | } | ||
519 | } | 516 | } |
520 | 517 | ||
521 | // delete message from server | 518 | // delete message from server |