Restore check to prevent overwriting hovered file when archiving

This commit is contained in:
Arun Prakash Jana 2022-12-12 14:42:03 +05:30
parent e8bc59a816
commit 2e84716e76
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 3 additions and 0 deletions

View File

@ -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;