From 046fb682f28b35a78d07e760f5d6ba7235b55f37 Mon Sep 17 00:00:00 2001 From: Aaron Ball Date: Thu, 26 Feb 2015 18:48:09 -0700 Subject: Added name set in note_new constructor The note name was just an empty array. This causes the name to be set on instantiation. --- src/note.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/note.c b/src/note.c index 372f64b..97af826 100644 --- a/src/note.c +++ b/src/note.c @@ -21,6 +21,7 @@ */ void note_new(note_t* note, char* path) { strcpy(note->path, path); + basename(path, note->name); } -- cgit v1.2.3