diff options
author | Geert Hauwaerts <geert@hauwaerts.be> | 2015-09-24 10:05:30 +0200 |
---|---|---|
committer | Geert Hauwaerts <geert@hauwaerts.be> | 2015-09-24 10:05:30 +0200 |
commit | fc3c0a84205885e5914c7e0812b35a4acbabc3b0 (patch) | |
tree | 5fc18bd39a3ddec8c5d40cffdba54f4bfb9cfbcf /src | |
parent | 3daadfa4a2c19757050ba934c5c112905763db9b (diff) | |
parent | b984f1fa250fd87b2808bed6826f17386ddb30ce (diff) | |
download | irssi-fc3c0a84205885e5914c7e0812b35a4acbabc3b0.zip |
Merge pull request #301 from dequis/dcc-get-ntfs-temp-bug
dcc-get: close() the temp fd so we don't get ETXTBSY in ntfs mounts
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); |