Commit Diff


commit - f4aa8eb5a5274991425a42d564cd909ac9a6569d
commit + 63a715ea098b554716e212b9d83e10d273e17cb4
blob - 9150b2ae1134e4c1faa1fd8271d3f8432ed4f764
blob + 879a95296cd02d54d16d3951e17b65d57c86abdf
--- fs.c
+++ fs.c
@@ -179,7 +179,11 @@ handle_dispatch_imsg(int fd, short ev, void *d)
 int
 fs_init(void)
 {
-	/* TODO: mkdir(~/.telescope) and touch bookmarks.gmi/known_hosts? */
+	char	dir[PATH_MAX];
+
+	strlcpy(dir, getenv("HOME"), sizeof(dir));
+	strlcat(dir, "/.telescope", sizeof(dir));
+	mkdir(dir, 0700);
 
 	strlcpy(bookmark_file, getenv("HOME"), sizeof(bookmark_file));
 	strlcat(bookmark_file, "/.telescope/bookmarks.gmi", sizeof(bookmark_file));