rem: if (!(share = OPN->share_lookup(OPN, SHARE_LOOKUP_PATH, file))) {
add: if (!(share = OPN->share_lookup(OPN, SHARE_LOOKUP_HPATH, file))) {
context: static void on_upload_read(int fd, input_id input, void *udata){	TCPC *con = (TCPC *) udata;	Share *share;	uint8_t buf[PATH_MAX + 256];	int bytes;	uint32_t offset;	char file[PATH_MAX + 1], user[64], fmt[32];		if (net_sock_error(fd)) {		tcp_close(con);		return;	}	if ((bytes = tcp_recv(con, buf, sizeof(buf) - 1)) <= 0)		return;	buf[bytes] = 0;	if (!strcmp(buf, "GET"))		return;	input_remove(input);	snprintf(fmt, sizeof(fmt), "%%%is \"%%%is[^\"]\" %%lu",	         sizeof(user) - 1, PATH_MAX);	sscanf(buf, fmt, user, file, &offset);		if (!(share = OPN->share_lookup(OPN, SHARE_LOOKUP_PATH, file))) {		tcp_close(con);		return;	}	switch (OPN->upload_auth(OPN, net_ip_str(con->host), share, NULL)) {		case UPLOAD_AUTH_ALLOW:			opn_upload_start(user, share, offset, con);			break;		case UPLOAD_AUTH_NOTSHARED:			tcp_send(con, OPN_MSG_FILENOTSHARED,			         strlen(OPN_MSG_FILENOTSHARED));			tcp_close(con);			break;		case UPLOAD_AUTH_STALE:			tcp_send(con, OPN_MSG_INVALIDREQUEST,			         strlen(OPN_MSG_INVALIDREQUEST));			tcp_close(con);		case UPLOAD_AUTH_MAX:		case UPLOAD_AUTH_MAX_PERUSER:			/* FIXME, maybe			 */			break;		default:			tcp_close(con);			break;	}}