summaryrefslogtreecommitdiffstats
path: root/src/delta
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-31 16:39:31 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-06-03 16:39:26 +0200
commit858d36c1ec7cd1173c60e8ab17b8425325253e38 (patch)
tree147284bf1b34c8917aa67bfdd2c15f672a0471af /src/delta
parentnetwork: avoid temporary variables for parsing, use TAKE_PTR (#9166) (diff)
downloadsystemd-858d36c1ec7cd1173c60e8ab17b8425325253e38.tar.xz
systemd-858d36c1ec7cd1173c60e8ab17b8425325253e38.zip
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/delta')
-rw-r--r--src/delta/delta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/delta/delta.c b/src/delta/delta.c
index aab1dbfad2..074ef426a9 100644
--- a/src/delta/delta.c
+++ b/src/delta/delta.c
@@ -655,7 +655,7 @@ int main(int argc, char *argv[]) {
int i;
for (i = optind; i < argc; i++) {
- path_kill_slashes(argv[i]);
+ path_simplify(argv[i], false);
k = process_suffix_chop(argv[i]);
if (k < 0)