Skip to content
This repository was archived by the owner on Feb 9, 2020. It is now read-only.

Commit 3c1d24a

Browse files
rogersmxenith
authored andcommitted
Add a rc check in when opening the help dir to check if it exists. Issue #7. (#16)
1 parent fa1b9aa commit 3c1d24a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/help.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ void load_helps()
106106

107107
help_list = AllocList();
108108

109-
directory = opendir("../help/");
109+
if((directory = opendir("../help/")) == NULL)
110+
{
111+
bug("Failed to open help directory");
112+
abort();
113+
}
110114
for (entry = readdir(directory); entry; entry = readdir(directory))
111115
{
112116
if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))

0 commit comments

Comments
 (0)