Skip to content
Prev 31985 / 63424 Next

unlink fails to remove symbolic links

A little more precisely, unlink fails when the file being unlinked is
a broken symbolic link (as in the example below). This is because
R_FileExists checks stat() == 0, and stat fails (returns -1) when
trying to resolve the broken link. Perhaps lstat() is more
appropriate?

Martin

Martin Morgan <mtmorgan at fhcrc.org> writes: