Commit d8355ef1a2864e1b142195cad3f7f3c0a7467998

Stefan Sperling 2019-02-10T15:44:12

make 'tog tree' identify executable files

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/tog/tog.c b/tog/tog.c
index c0beece..ba0eaeb 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -3029,7 +3029,8 @@ draw_tree_entries(struct tog_view *view,
 				return got_error_from_errno();
 		}
 		if (asprintf(&line, "%s  %s%s", id_str ? id_str : "",
-		    te->name, S_ISDIR(te->mode) ? "/" : "") == -1) {
+		    te->name, S_ISDIR(te->mode) ? "/" :
+		    ((te->mode & S_IXUSR) ? "*" : "")) == -1) {
 			free(id_str);
 			return got_error_from_errno();
 		}