slackbuilds_ponce/network/elinks/patches/0040-gopher-directory-links.patch
Dave Woodfall 4b6c4b9509
network/elinks: Add Patches: disable suspend, -no-connect
2 contributed patches.
VERSION renumbering with commit hash.  Not likely to change unless
felinks fixes are back-ported though.
Change download URL.
Extra notes in README.
Tidy up slackbuild a bit. Move stuff.

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2022-04-30 13:51:48 +07:00

26 lines
810 B
Diff

#######################################################################
# Fix remote directory links.
# dave@slackbuilds.org
#######################################################################
diff -Naur -x .git bb/src/protocol/gopher/gopher.c cc/src/protocol/gopher/gopher.c
--- bb/src/protocol/gopher/gopher.c 2020-01-13 23:22:18.918292198 +0000
+++ cc/src/protocol/gopher/gopher.c 2020-01-13 23:21:00.631960039 +0000
@@ -321,6 +321,18 @@
selectorlen++;
}
+ if (entity_info->type == '1') {
+ if (strchr(selector, '1') == (char *) selector) {
+ selector++;
+ selectorlen--;
+ }
+ else {
+ if ((char *) selector == "/1") {
+ selectorlen--;
+ }
+ }
+ }
+
state = add_gopher_command(conn, &command, entity, selector, selectorlen);
if (!is_in_state(state, S_CONN))
return state;