summaryrefslogtreecommitdiff
path: root/src/shared/path-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/path-util.c')
-rw-r--r--src/shared/path-util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/path-util.c b/src/shared/path-util.c
index 52ce65de6..0b50ea646 100644
--- a/src/shared/path-util.c
+++ b/src/shared/path-util.c
@@ -215,6 +215,16 @@ char **path_strv_canonicalize(char **l) {
return l;
}
+char **path_strv_canonicalize_uniq(char **l) {
+ if (strv_isempty(l))
+ return l;
+
+ if (!path_strv_canonicalize(l))
+ return NULL;
+
+ return strv_uniq(l);
+}
+
char *path_kill_slashes(char *path) {
char *f, *t;
bool slash = false;