Delete seems to follow symlinks

Answered

It seems the algorithm for deleting files when cleaning files in the work/.old directory follows symlinks. This is less than excellent when running the agent as root and the symlinks point to let's say /bin or /etc.

One could argue that leaving symlinks in the first place is a bad idea, but it could happen.

We use a system of debootstrap and chroot and some clever symlinking to ensure we get clean environments of the os-version/bitness/architecture we need. In some cases when builds fail we lose important information in the file system of the machine itself.

Is it possible to replace the deletion code by a custom script? That'd probably work for us, as we could then ensure cleanup and do the file deletion in a way we see fit.

1 comment

Hello Jesper,

TC follows the symlinks, if it cannot delete a directory using native command. Please check that rm -rf .../work/.old/XXX can delete the whole dir.

We have the related request: https://youtrack.jetbrains.com/issue/TW-43688, please watch/vote for it.

0

Please sign in to leave a comment.