mirror of
https://github.com/irssi/irssi.git
synced 2026-08-19 16:42:30 +02:00
dcc get shouldn't fail when file attrs can't be changed
This commit is contained in:
parent
ccfb2dabcf
commit
3cbcb4fe85
1 changed files with 7 additions and 3 deletions
|
|
@ -237,8 +237,12 @@ void sig_dccget_connected(GET_DCC_REC *dcc)
|
||||||
|
|
||||||
if (temphandle == -1)
|
if (temphandle == -1)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
else
|
else {
|
||||||
ret = fchmod(temphandle, dcc_file_create_mode);
|
if (fchmod(temphandle, dcc_file_create_mode) != 0)
|
||||||
|
g_warning("fchmod(3) failed: %s", strerror(errno));
|
||||||
|
/* proceed even if chmod fails */
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
|
||||||
close(temphandle);
|
close(temphandle);
|
||||||
|
|
||||||
|
|
@ -249,7 +253,7 @@ void sig_dccget_connected(GET_DCC_REC *dcc)
|
||||||
/* Linux */
|
/* Linux */
|
||||||
(errno == EPERM ||
|
(errno == EPERM ||
|
||||||
/* FUSE */
|
/* FUSE */
|
||||||
errno == ENOSYS ||
|
errno == ENOSYS || errno == EACCES ||
|
||||||
/* BSD */
|
/* BSD */
|
||||||
errno == EOPNOTSUPP)) {
|
errno == EOPNOTSUPP)) {
|
||||||
/* hard links aren't supported - some people
|
/* hard links aren't supported - some people
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue