Mercurial > hg > forks > geeqie
changeset 2585:007dc5135fac
Fix #506: ignore chmod errors for filesystems not supporting the operation
https://github.com/BestImageViewer/geeqie/issues/506
author | Alberto Griggio <> |
---|---|
date | Tue, 29 Aug 2017 10:13:17 +0100 |
parents | f1276158f9a5 |
children | e2c53828af57 |
files | src/ui_fileops.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ui_fileops.c Tue Aug 22 10:12:34 2017 +0100 +++ b/src/ui_fileops.c Tue Aug 29 10:13:17 2017 +0100 @@ -483,7 +483,12 @@ /* Ignores chown errors, while still doing chown (so root still can copy files preserving ownership) */ ret = TRUE; - if (chmod(tl, st.st_mode) < 0) ret = FALSE; + if (chmod(tl, st.st_mode) < 0) { + struct stat st2; + if (stat(tl, &st2) != 0 || st2.st_mode != st.st_mode) { + ret = FALSE; + } + } } tb.actime = st.st_atime;