Maybe `if (hande->realpath[0] != '\0' && handle->realpath[0] != '/') {`?  I'll leave that to your good judgment.