Fix #1345: allow symlink name '@' in single file case

This commit is contained in:
Arun Prakash Jana 2022-04-20 20:20:25 +05:30
parent 15243186c5
commit 6b9f8f3666
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 1 additions and 1 deletions

View File

@ -7657,7 +7657,7 @@ nochange:
mkpath(path, tmp, newpath);
ret = xmktree(newpath, r == 'f' ? FALSE : TRUE);
} else if (r == 's' || r == 'h') {
if (tmp[0] == '@' && tmp[1] == '\0')
if (nselected > 1 && tmp[0] == '@' && tmp[1] == '\0')
tmp[0] = '\0';
ret = xlink(tmp, path, (ndents ? pdents[cur].name : NULL),
newpath, &presel, r);