tree-wide: Get rid of prefix_roota() in favor of path_join()
We deprecated prefix_roota() in favor of chase() and path_join(). Let's finish the removal by replacing the few remaining call sites with path_join().
This commit is contained in:
@@ -2416,11 +2416,13 @@ static int create_symlink(Context *c, Item *i) {
|
||||
r = chase(i->argument, arg_root, CHASE_SAFE|CHASE_PREFIX_ROOT|CHASE_NOFOLLOW, /* ret_path = */ NULL, /* ret_fd = */ NULL);
|
||||
if (r == -ENOENT) {
|
||||
/* Silently skip over lines where the source file is missing. */
|
||||
log_info("Symlink source path '%s' does not exist, skipping line.", prefix_roota(arg_root, i->argument));
|
||||
log_info("Symlink source path '%s/%s' does not exist, skipping line.",
|
||||
empty_to_root(arg_root), skip_leading_slash(i->argument));
|
||||
return 0;
|
||||
}
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to check if symlink source path '%s' exists: %m", prefix_roota(arg_root, i->argument));
|
||||
return log_error_errno(r, "Failed to check if symlink source path '%s/%s' exists: %m",
|
||||
empty_to_root(arg_root), skip_leading_slash(i->argument));
|
||||
}
|
||||
|
||||
r = path_extract_filename(i->path, &bn);
|
||||
|
||||
Reference in New Issue
Block a user