summaryrefslogtreecommitdiff
path: root/src/cgls
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-31 23:39:31 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-06-03 23:39:26 +0900
commit858d36c1ec7cd1173c60e8ab17b8425325253e38 (patch)
tree147284bf1b34c8917aa67bfdd2c15f672a0471af /src/cgls
parentaff443013640ba783c89c9032ebd5a557f2fc11e (diff)
downloadsystemd-858d36c1ec7cd1173c60e8ab17b8425325253e38.tar.gz
path-util: introduce path_simplify()
The function is similar to path_kill_slashes() but also removes initial './', trailing '/.', and '/./' in the path. When the second argument of path_simplify() is false, then it behaves as the same as path_kill_slashes(). Hence, this also replaces path_kill_slashes() with path_simplify().
Diffstat (limited to 'src/cgls')
-rw-r--r--src/cgls/cgls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c
index 7c7ea18b61..4ad84bec93 100644
--- a/src/cgls/cgls.c
+++ b/src/cgls/cgls.c
@@ -241,7 +241,7 @@ int main(int argc, char *argv[]) {
goto finish;
}
- path_kill_slashes(j);
+ path_simplify(j, false);
path = j;
} else
path = root;