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’”
You have shutil.py
in your standard Python distribution (on Ubuntu, mine is under /usr/lib/python2.6
for instance; Windows might be C:\Python26\lib
?). The copytree function is only 38 lines long (34 if you don't count comments), and the end of the docstring explicitly states:
XXX Consider this example code rather than the ultimate tool.
So the simplest way really would be to change/add a couple lines to copytree, or find another library, to be honest.