diff --git a/src/delete.c b/src/delete.c index cfdd086..0cf6fcc 100644 --- a/src/delete.c +++ b/src/delete.c @@ -229,13 +229,15 @@ int delete_dir(struct dir *dr) { void delete_process() { - struct dir *n = root->parent; + struct dir *n; /* confirm */ seloption = 1; while(state == DS_CONFIRM && !noconfirm) if(input_handle(0)) return browse_init(root); + n = root->parent->sub != root ? root->parent->sub : root->next ? root->next : root->parent; + /* delete */ lastupdate = 999; seloption = 0;