1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Fallback on rename also when errno is ENOSYS/EOPNOTSUPP because

FUSE/BSD sets this value when link is not available.
Based on a patch by Juuso Tähkäpää, bug 536.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4631 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2007-10-29 15:37:31 +00:00 committed by exg
parent cfcbb9a7b1
commit d9782fab84

View File

@ -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() */