]> granicus.if.org Git - python/commit
bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files....
authorOlexa Bilaniuk <obilaniu@users.noreply.github.com>
Fri, 10 May 2019 03:22:06 +0000 (22:22 -0500)
committerGiampaolo Rodola <g.rodola@gmail.com>
Fri, 10 May 2019 03:22:06 +0000 (11:22 +0800)
commit79efbb719383386051c72f2ee932eeca8e033e6b
treeca694616676aaad7de81f41ee5d1b16dd18455be
parent948ed8c96b6912541a608591efe3e00fb520429a
bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files. (PR-13212)

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.
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]