diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -19,6 +19,7 @@ #include <dirent.h> #include <string.h> #include <time.h> +#include <errno.h> #include "note_list.h" #include "note.h" @@ -132,6 +133,8 @@ int main(int argc, char* argv []) { config_get(&c, "extension") ); + if(errno != 0) { return 1; } + if(strcmp(argv[1], "ls") == 0 || strcmp(argv[1], "list") == 0) { list_notes(&list); } else if(strcmp(argv[1], "new") == 0) { |