]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files....
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 14 May 2019 05:30:22 +0000 (22:30 -0700)
committerGiampaolo Rodola <g.rodola@gmail.com>
Tue, 14 May 2019 05:30:22 +0000 (13:30 +0800)
commit0a5b88e7f23b671d63896619b13148b0e4e2b5dd
treeefd4fa070f4f951fafb751e5a6a50223038e4768
parentda86bf7396c6509534a94407fe83e7106c9d5959
bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files. (PR-13212) (#13234)

Extended attributes can only be set on user-writeable files, but shutil previously
first chmod()ed the destination file to the source's permissions and then tried to
copy xattrs. This will cause failures if attempting to copy read-only files with
xattrs, as occurs with Git clones on Lustre FS.
(cherry picked from commit 79efbb719383386051c72f2ee932eeca8e033e6b)

Co-authored-by: Olexa Bilaniuk <obilaniu@users.noreply.github.com>
Lib/shutil.py
Lib/test/test_shutil.py
Misc/ACKS
Misc/NEWS.d/next/Library/2019-05-09-08-35-18.bpo-24538.WK8Y-k.rst [new file with mode: 0644]