Python's shutil.copytree
is not very flexible; what is the simplest way to add support for ignoring permissions while copying in copytree
(without having to re-write its implementation)?
Otherwise, copytree
fails like this:
(…)”[Errno 45] Operation not supported: ‘/path/foo/bar’”
Not thread-safe (or advisable in general) but OK for a throwaway script:
import shutil _orig_copystat = shutil.copystat shutil.copystat = lambda x, y: x shutil.copytree(src, dst) shutil.copystat = _orig_copystat
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With