Comment 1 for bug 144228

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

To rephrase Radim, symbolic links pointing to directories are not properly removed by buildout. This is because in _uninstall, removed filesystem items are first checked for whether they are directories. An os.path.isdir(link) check for a link pointing to a directory returns True, similarly to check on a link pointing to a file returns True for an isfile(link) check.

Buildout checks first for whether the filesystem item to be removed returns True for isdir(). This is wrong, because buildout then tries to rmtree(link), which causes havoc.

Instead, in _uninstall, the check for file & link should be first.The issue can thus simply be fixed by reversing the checks.