diff --git a/src/lib.c b/src/lib.c index f4f1607..962f119 100644 --- a/src/lib.c +++ b/src/lib.c @@ -364,7 +364,7 @@ bool copy_file(const gchar* src, const gchar* dest) { goto fail2; } - if (chmod(dest, st.st_mode) != 0) { + if (fchmod(fd_dest, st.st_mode) != 0) { LOG(MOD "Unable to chmod '%d' '%s'\n", st.st_mode, dest); goto fail2; }