blob: cbd044e86e23e6b38b0d8d60f3ca3725b5dd5106 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* ISC license. */
#include <errno.h>
#include <skalibs/stralloc.h>
#include <skalibs/djbunix.h>
#include <skalibs/unix-transactional.h>
void dd_cancel (dirdescriptor_t *dd)
{
dirdescriptor_t zero = DIRDESCRIPTOR_ZERO ;
register int e = errno ;
fd_close(dd->fd) ;
rm_rf_in_tmp(&dd->new, 0) ;
stralloc_free(&dd->new) ;
*dd = zero ;
errno = e ;
}
|