+2011-03-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fileio.c (Fcopy_file): Report error if fchown or fchmod fail.
+
2011-03-20 Paul Eggert <eggert@cs.ucla.edu>
* emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
owner and group. */
if (input_file_statable_p)
{
- if (! NILP (preserve_uid_gid))
- fchown (ofd, st.st_uid, st.st_gid);
- fchmod (ofd, st.st_mode & 07777);
+ if (!NILP (preserve_uid_gid) && fchown (ofd, st.st_uid, st.st_gid) != 0)
+ report_file_error ("Doing chown", Fcons (newname, Qnil));
+ if (fchmod (ofd, st.st_mode & 07777) != 0)
+ report_file_error ("Doing chmod", Fcons (newname, Qnil));
}
#endif /* not MSDOS */