tree-wide: always drop unnecessary dot in path
This commit is contained in:
@@ -160,7 +160,7 @@ static int image_new(
|
||||
if (!i->path)
|
||||
return -ENOMEM;
|
||||
|
||||
path_simplify(i->path, false);
|
||||
path_simplify(i->path);
|
||||
|
||||
*ret = TAKE_PTR(i);
|
||||
|
||||
|
||||
@@ -289,14 +289,14 @@ int unit_file_changes_add(
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
|
||||
path_simplify(p, false);
|
||||
path_simplify(p);
|
||||
|
||||
if (source) {
|
||||
s = strdup(source);
|
||||
if (!s)
|
||||
return -ENOMEM;
|
||||
|
||||
path_simplify(s, false);
|
||||
path_simplify(s);
|
||||
}
|
||||
|
||||
c[(*n_changes)++] = (UnitFileChange) {
|
||||
@@ -515,7 +515,7 @@ static int mark_symlink_for_removal(
|
||||
if (!n)
|
||||
return -ENOMEM;
|
||||
|
||||
path_simplify(n, false);
|
||||
path_simplify(n);
|
||||
|
||||
r = set_consume(*remove_symlinks_to, n);
|
||||
if (r == -EEXIST)
|
||||
@@ -597,7 +597,7 @@ static int remove_marked_symlinks_fd(
|
||||
p = path_make_absolute(de->d_name, path);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
path_simplify(p, false);
|
||||
path_simplify(p);
|
||||
|
||||
q = chase_symlinks(p, NULL, CHASE_NONEXISTENT, &dest, NULL);
|
||||
if (q == -ENOENT)
|
||||
|
||||
@@ -454,7 +454,7 @@ static int relabel_extra(void) {
|
||||
if (r == 0) /* EOF */
|
||||
break;
|
||||
|
||||
path_simplify(line, true);
|
||||
path_simplify(line);
|
||||
|
||||
if (!path_is_normalized(line)) {
|
||||
log_warning("Path to relabel is not normalized, ignoring: %s", line);
|
||||
|
||||
@@ -73,7 +73,7 @@ int parse_path_argument(const char *path, bool suppress_root, char **arg) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to parse path \"%s\" and make it absolute: %m", path);
|
||||
|
||||
path_simplify(p, false);
|
||||
path_simplify(p);
|
||||
if (suppress_root && empty_or_root(p))
|
||||
p = mfree(p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user