/home/phk/jg

This commit is contained in:
Poul-Henning Kamp 1994-09-20 06:28:16 +00:00
parent d4daf998ed
commit 3a15523260

@ -133,7 +133,7 @@ linkit(target, source, isdir)
} }
/* If the source is a directory, append the target's name. */ /* If the source is a directory, append the target's name. */
if (isdir || (exists = !stat(source, &sb)) && S_ISDIR(sb.st_mode)) { if (isdir || ((exists = !stat(source, &sb)) && S_ISDIR(sb.st_mode))) {
if ((p = strrchr(target, '/')) == NULL) if ((p = strrchr(target, '/')) == NULL)
p = target; p = target;
else else
@ -148,7 +148,7 @@ linkit(target, source, isdir)
* If the file exists, and -f was specified, unlink it. * If the file exists, and -f was specified, unlink it.
* Attempt the link. * Attempt the link.
*/ */
if (fflag && exists && unlink(source) || (*linkf)(target, source)) { if (fflag && exists && (unlink(source) || (*linkf)(target, source))) {
warn("%s", source); warn("%s", source);
return (1); return (1);
} }