projects
/
geeqie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33386eb
)
Fix #506: ignore chmod errors for filesystems not supporting the operation
author
Alberto Griggio
<>
Tue, 29 Aug 2017 09:13:17 +0000
(10:13 +0100)
committer
Colin Clark
<colin.clark@cclark.uk>
Tue, 29 Aug 2017 09:13:17 +0000
(10:13 +0100)
https://github.com/BestImageViewer/geeqie/issues/506
src/ui_fileops.c
patch
|
blob
|
history
diff --git
a/src/ui_fileops.c
b/src/ui_fileops.c
index
c4466fc
..
f2faa56
100644
(file)
--- a/
src/ui_fileops.c
+++ b/
src/ui_fileops.c
@@
-483,7
+483,12
@@
gboolean copy_file_attributes(const gchar *s, const gchar *t, gint perms, gint m
/* 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;