short circuit install -l rs
When requesting install(1) to only make relative symlinks, by pass all the done to actually compute the relative symlink if the path given in argument is already a relative path
This commit is contained in:
parent
0dd72530a3
commit
1a23485db6
@ -658,6 +658,14 @@ makelink(const char *from_name, const char *to_name,
|
||||
if (dolink & LN_RELATIVE) {
|
||||
char *cp, *d, *s;
|
||||
|
||||
if (*from_name != '/') {
|
||||
/* this is already a relative link */
|
||||
do_symlink(from_name, to_name, target_sb);
|
||||
/* XXX: from_name may point outside of destdir. */
|
||||
metadata_log(to_name, "link", NULL, from_name, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Resolve pathnames. */
|
||||
if (realpath(from_name, src) == NULL)
|
||||
err(EX_OSERR, "%s: realpath", from_name);
|
||||
|
Loading…
Reference in New Issue
Block a user