summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 049de6d..aa51cdb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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) {

Generated by cgit