summaryrefslogtreecommitdiff
path: root/ratox.c
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-09-23 14:55:14 +0100
committersin <sin@2f30.org>2014-09-23 14:55:43 +0100
commit4b8ac3cbca060cd83239d3429173bdd74a90c813 (patch)
tree2e336ee614b4150db628124291f11a673ce25f96 /ratox.c
parent6d37651aad27119cda9f786046f2694ddbb538ec (diff)
Cancel transfer first, then remove files (we need the fd)
Diffstat (limited to 'ratox.c')
-rw-r--r--ratox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ratox.c b/ratox.c
index c2d4cb9..738c052 100644
--- a/ratox.c
+++ b/ratox.c
@@ -928,6 +928,7 @@ frienddestroy(struct friend *f)
{
int i;
+ canceltransfer(f);
for (i = 0; i < LEN(ffiles); i++) {
if (f->dirfd != -1) {
unlinkat(f->dirfd, ffiles[i].name, 0);
@@ -936,7 +937,6 @@ frienddestroy(struct friend *f)
}
}
rmdir(f->idstr);
- canceltransfer(f);
TAILQ_REMOVE(&friendhead, f, entry);
}