diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-09-02 11:52:26 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-10-05 12:25:47 +0200 |
commit | 6c7edfbb862b1598b74e4413121dfa42e3a79211 (patch) | |
tree | 9cb7bb6440680c66aebbe76477a727cd9f879d18 /src/todo.c | |
parent | c77d1a573fc9c9d27ccc8c80a5a67245a3cf0e1b (diff) | |
download | calcurse-6c7edfbb862b1598b74e4413121dfa42e3a79211.zip |
Do not unlink() note files on note removal
Now that we use hash-based note file names, note files should never be
unlinked as a note file might be shared.
Also, remove the ERASE_FORCE_KEEP_NOTE flag that no longer makes any
sense.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/todo.c')
-rw-r--r-- | src/todo.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -204,12 +204,12 @@ todo_delete_note_bynum (unsigned num) if (!todo->note) EXIT (_("no note attached")); - erase_note (&todo->note, ERASE_FORCE_ONLY_NOTE); + erase_note (&todo->note); } /* Delete an item from the todo linked list. */ static void -todo_delete_bynum (unsigned num, enum eraseflg flag) +todo_delete_bynum (unsigned num) { llist_item_t *i = LLIST_NTH (&todolist, num); @@ -219,7 +219,7 @@ todo_delete_bynum (unsigned num, enum eraseflg flag) LLIST_REMOVE (&todolist, i); mem_free (todo->mesg); - erase_note (&todo->note, flag); + erase_note (&todo->note); mem_free (todo); } @@ -288,7 +288,7 @@ todo_delete (struct conf *conf) switch (answer) { case 't': - todo_delete_bynum (hilt - 1, ERASE_FORCE); + todo_delete_bynum (hilt - 1); todos--; if (hilt > 1) hilt--; @@ -358,7 +358,7 @@ todo_chg_priority (int action) } if (do_chg) { - todo_delete_bynum (hilt - 1, ERASE_FORCE_KEEP_NOTE); + todo_delete_bynum (hilt - 1); backup = todo_add (backup_mesg, backup_id, backup_note); hilt = todo_get_position (backup); } @@ -516,7 +516,7 @@ void todo_free (struct todo *todo) { mem_free (todo->mesg); - erase_note (&todo->note, ERASE_FORCE_KEEP_NOTE); + erase_note (&todo->note); mem_free (todo); } |