Message373998
Since the need to copy file ownership is common, I think there could be space for a new copy3() function which copies ownership + extended attributes (where possible). In detail:
- on Windows this can be achieved by using CopyFileEx, which would also provide better overall performances than the current readinto() implementation. This was the original approach used in BPO-33671, discarded after Eryk pointed out that ACLs should not be copied.
- on macOS we can use fcopyfile() (which is already exposed privately) + COPYFILE_ALL, see http://www.manpagez.com/man/3/fcopyfile/
- on all other UNIX we can use the current shutil.copystat() (which already copies xattrs) + os.chown(). I am not entirely sure this would achieve a "full ACLs copy" though, or what would be needed exactly to achieve that. |
|
Date |
User |
Action |
Args |
2020-07-20 11:01:51 | giampaolo.rodola | set | recipients:
+ giampaolo.rodola, christian.heimes, eryksun, noctiflore |
2020-07-20 11:01:51 | giampaolo.rodola | set | messageid: <1595242911.52.0.565267141103.issue30044@roundup.psfhosted.org> |
2020-07-20 11:01:51 | giampaolo.rodola | link | issue30044 messages |
2020-07-20 11:01:50 | giampaolo.rodola | create | |
|