From d9782fab84a66a04eb42bb8804236a860b799574 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Mon, 29 Oct 2007 15:37:31 +0000 Subject: [PATCH] =?UTF-8?q?Fallback=20on=20rename=20also=20when=20errno=20?= =?UTF-8?q?is=20ENOSYS/EOPNOTSUPP=20because=20FUSE/BSD=20sets=20this=20val?= =?UTF-8?q?ue=20when=20link=20is=20not=20available.=20Based=20on=20a=20pat?= =?UTF-8?q?ch=20by=20Juuso=20T=C3=A4hk=C3=A4p=C3=A4=C3=A4,=20bug=20536.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4631 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/dcc/dcc-get.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c index e53a0d23..e8e67731 100644 --- a/src/irc/dcc/dcc-get.c +++ b/src/irc/dcc/dcc-get.c @@ -226,7 +226,13 @@ void sig_dccget_connected(GET_DCC_REC *dcc) if (ret != -1) { ret = link(tempfname, dcc->file); - if (ret == -1 && errno == EPERM) { + if (ret == -1 && + /* Linux */ + (errno == EPERM || + /* FUSE */ + errno == ENOSYS || + /* BSD */ + errno == EOPNOTSUPP)) { /* hard links aren't supported - some people want to download stuff to FAT/NTFS/etc partitions, so fallback to rename() */