From: Arun Prakash Jana Date: Mon, 12 Dec 2022 09:12:03 +0000 (+0530) Subject: Restore check to prevent overwriting hovered file when archiving X-Git-Tag: v4.8~55 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=2e84716e76122cb7d4d15e72d69dc4b0a38cd1c6;p=nnn.git Restore check to prevent overwriting hovered file when archiving --- diff --git a/src/nnn.c b/src/nnn.c index d8a9f8c4..f0189d19 100644 --- 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;