1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 06:45:25 +00:00

Merge pull request #844 from CatboxParadox/perms

dcc get shouldn't fail when file attrs can't be changed
This commit is contained in:
ailin-nemui 2018-02-13 11:10:21 +01:00 committed by GitHub
commit c01f6df957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,8 +237,12 @@ void sig_dccget_connected(GET_DCC_REC *dcc)
if (temphandle == -1)
ret = -1;
else
ret = fchmod(temphandle, dcc_file_create_mode);
else {
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);
@ -249,7 +253,7 @@ void sig_dccget_connected(GET_DCC_REC *dcc)
/* Linux */
(errno == EPERM ||
/* FUSE */
errno == ENOSYS ||
errno == ENOSYS || errno == EACCES ||
/* BSD */
errno == EOPNOTSUPP)) {
/* hard links aren't supported - some people