mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-04 06:14:50 +01:00
49297 (quoting amended): error message in files module.
If ENONENT it could be the other argument that doesn't exist, so check.
This commit is contained in:
parent
cd89e1937d
commit
4a9437317f
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2021-08-24 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 49297 with quoting updated: Src/Modules/files.c: check
|
||||
which files is in error when ENOENT on link etc.
|
||||
|
||||
2021-08-24 dana <dana@dana.is>
|
||||
|
||||
* github #78: DCsunset: Completion/Unix/Command/_pandoc: Fix
|
||||
|
|
|
@ -346,7 +346,13 @@ domove(char *nam, MoveFunc movefn, char *p, char *q, int flags)
|
|||
unlink(qbuf);
|
||||
}
|
||||
if(movefn(pbuf, qbuf)) {
|
||||
zwarnnam(nam, "%s: %e", p, errno);
|
||||
int ferrno = errno;
|
||||
char *errfile = p;
|
||||
if (ferrno == ENOENT && !lstat(pbuf, &st)) {
|
||||
/* p *does* exist, so error is in q */
|
||||
errfile = q;
|
||||
}
|
||||
zwarnnam(nam, "`%s': %e", errfile, ferrno);
|
||||
zsfree(pbuf);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue