commit - fe67a6742c21d58ed966eb3472101039b94bd418
commit + 26e95b82a96d043e96f6364a9053c02d5d855ece
blob - 66e45249a521ca684e82a0124682cc90e98213f7
blob + ee92ccb9378b576dfa1f07f2530588635bf91971
--- fs.c
+++ fs.c
char crashed_file[PATH_MAX];
char session_file[PATH_MAX], session_file_tmp[PATH_MAX];
char history_file[PATH_MAX], history_file_tmp[PATH_MAX];
+
+char cwd[PATH_MAX];
static int
select_non_dot(const struct dirent *d)
char *home;
struct stat info;
+ if (getcwd(cwd, sizeof(cwd)) == NULL)
+ err(1, "getcwd failed");
+
/* old path */
if ((home = getenv("HOME")) == NULL)
errx(1, "HOME is not defined");
blob - a907499540a49280b469c1392c0fd0ff39c063b5
blob + c18c4d95757e523512b6cf129160fa9189ceb0cb
--- include/fs.h
+++ include/fs.h
extern char session_file[PATH_MAX], session_file_tmp[PATH_MAX];
extern char history_file[PATH_MAX], history_file_tmp[PATH_MAX];
+extern char cwd[PATH_MAX];
+
int fs_init(void);
void fs_load_url(struct tab *, const char *);
blob - 523b39689816b53dd033316708ec647afbfe020c
blob + 2957b75bcacd65449e3944e17755a0e98e92afa5
--- telescope.c
+++ telescope.c
static int has_url;
static char url[GEMINI_URL_LEN];
-static char cwd[PATH_MAX];
/*
* Used to know when we're finished loading.
if (getenv("NO_COLOR") != NULL)
enable_colors = 0;
-
- if (getcwd(cwd, sizeof(cwd)) == NULL)
- err(1, "getcwd failed");
while ((ch = getopt_long(argc, argv, opts, longopts, NULL)) != -1) {
switch (ch) {