Comment 13 for bug 144228

Revision history for this message
Petri Savolainen (petri-savolainen) wrote :

I have forked master and applied the fix.

I've not applied Kazuhiko's further suggestion (see above): afaik, it runs only when rmtree is called with a link pointing to a directory. As that will no longer be case with the fix applied, the modified code will not run (for the linked directories rmtree has previously left at mode 0600) any more. Please do correct me if I'm mistaken.

It then occurred to me to checked whether rmtree is called from elsewhere in buildout.py. I found another case that will potentially cause trouble exactly the same way. See code starting at line 1271, in the Options._call method:

https://github.com/buildout/buildout/blob/master/src/zc/buildout/buildout.py#L1272

Unless anyone objects, I will fix that as well and then submit a pull request. Although I don't know in what scenario one would pass a link (pointing to a directory) to Options._call, I'd rather fix it now than risk running into this issue again later.