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:
parent
cfcbb9a7b1
commit
d9782fab84
@ -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() */
|
||||
|
Loading…
Reference in New Issue
Block a user