diff options
Diffstat (limited to 'src/fm.c')
| -rw-r--r-- | src/fm.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -586,3 +586,20 @@ fm_rename(fm_info *info) return 0; } +/* + REATURN VALUE: + -1: error + -2: cancel + */ +int +fm_rm(const char *path) +{ + if (!path) { + return -1; + } + + if (y_or_n("Delete it?")) + return (remove(path) == 0) ? 0 : -1; + else + return -2; +} |
