~vcs-imports/nano/master

Viewing all changes in revision 8886.

  • Committer: Benno Schulenberg
  • Date: 2020-05-24 14:08:05 UTC
  • Revision ID: git-v1:5449d1e6a523e0ae53f3a45d35b390f9a3b4dab3
files: ignore errors when calling chown() on a backup file

A normal user can change the group of a file (if the user is a member
of that group), but cannot change the owner of that file.  So, when a
user edits a file that belongs to a different user, the call of fchown()
will fail.  But there is no harm in that.  Also when the user is root,
there is no harm in fchown() failing -- it will simply mean that the
backup file will remain owned by root and will not be writable by the
intended owner (when root has the normal umask of 0022).

This fixes https://savannah.gnu.org/bugs/?58383.

Bug existed since version 2.2.5, commit 86be3af7.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: