diff --git a/src/nnn.c b/src/nnn.c index b1052f9c2..bffc8f0d6 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -8759,6 +8759,11 @@ int main(int argc, char *argv[]) close(fd); selpath = abspath(optarg, NULL, NULL); + if (!selpath) { + xerror(); + return EXIT_FAILURE; + } + unlink(selpath); } break;