Avoid search release on empty path.