A quick fix: upon success, readlink() returns a non-negative value (not 0, as the code expected). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>