diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/dcc/dcc-get.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c index 1208b5c5..a8b1c967 100644 --- a/src/irc/dcc/dcc-get.c +++ b/src/irc/dcc/dcc-get.c @@ -226,6 +226,8 @@ void sig_dccget_connected(GET_DCC_REC *dcc) else ret = fchmod(temphandle, dcc_file_create_mode); + close(temphandle); + if (ret != -1) { ret = link(tempfname, dcc->file); @@ -249,7 +251,6 @@ void sig_dccget_connected(GET_DCC_REC *dcc) /* close/remove the temp file */ ret_errno = errno; - close(temphandle); unlink(tempfname); g_free(tempfname); |