Skip to content

Commit 3714e6f

Browse files
committed
hide hint when directory path ends with /
1 parent e20a755 commit 3714e6f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gplaces.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ static char *shell_hints(const char *buf, const char **ansi1, const char **ansi2
17401740
if (strncmp(val, "gemini://", 9) == 0) snprintf(hint, sizeof(hint), " %s", &val[9]);
17411741
else if (strncmp(val, "file://", 7) == 0) snprintf(hint, sizeof(hint), " %s", &val[7]);
17421742
else snprintf(hint, sizeof(hint), " %s", val);
1743-
} else if (buf[0] == '/' && stat(buf, &stbuf) == 0 && S_ISDIR(stbuf.st_mode)) return "/";
1743+
} else if (buf[0] == '/' && buf[strlen(buf) - 1] != '/' && stat(buf, &stbuf) == 0 && S_ISDIR(stbuf.st_mode)) return "/";
17441744
else return NULL;
17451745
return hint;
17461746
}

0 commit comments

Comments
 (0)