summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@iohq.net>2015-02-26 18:48:09 -0700
committerAaron Ball <nullspoon@iohq.net>2015-02-26 18:48:09 -0700
commit046fb682f28b35a78d07e760f5d6ba7235b55f37 (patch)
tree0618f9968271bd06ff93831f490fa5c52cc0eed7
parent593cadff343af86b46f144a098b300662d9dc869 (diff)
downloadnoteless-046fb682f28b35a78d07e760f5d6ba7235b55f37.tar.gz
noteless-046fb682f28b35a78d07e760f5d6ba7235b55f37.tar.xz
Added name set in note_new constructor
The note name was just an empty array. This causes the name to be set on instantiation.
-rw-r--r--src/note.c1
1 files changed, 1 insertions, 0 deletions
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);
}

Generated by cgit