commit 2e84716e76122cb7d4d15e72d69dc4b0a38cd1c6
parent e8bc59a81609e4e38888066c06c316b3782f3260
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date: Mon, 12 Dec 2022 14:42:03 +0530
Restore check to prevent overwriting hovered file when archiving
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/nnn.c b/src/nnn.c
@@ -7610,6 +7610,9 @@ nochange:
switch (sel) {
case SEL_ARCHIVE:
+ if (r == 'c' && strcmp(tmp, pdents[cur].name) == 0)
+ continue; /* Cannot overwrite the hovered file */
+
tmp = abspath(tmp, NULL, newpath);
if (!tmp)
continue;