diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2018-02-13 11:10:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 11:10:21 +0100 |
commit | c01f6df9573f3a5596bdb4c319faa109567f4221 (patch) | |
tree | 43c17fdc8433ad2de72b2f5860bdb2b0fc349fd7 /src/irc/dcc/dcc-get.c | |
parent | b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f (diff) | |
parent | 3cbcb4fe85ec3233aa36b56a047470df5d4221f3 (diff) | |
download | irssi-c01f6df9573f3a5596bdb4c319faa109567f4221.zip |
Merge pull request #844 from CatboxParadox/perms
dcc get shouldn't fail when file attrs can't be changed
Diffstat (limited to 'src/irc/dcc/dcc-get.c')
-rw-r--r-- | src/irc/dcc/dcc-get.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c index cecbb076..ee8b9a49 100644 --- a/src/irc/dcc/dcc-get.c +++ b/src/irc/dcc/dcc-get.c @@ -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 |