]> git.ipfire.org Git - thirdparty/systemd.git/commit
path-util: fix path_simplify() with kill_dots and "."
authorThomas Haller <thaller@redhat.com>
Fri, 5 Oct 2018 11:14:38 +0000 (13:14 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 5 Oct 2018 19:41:33 +0000 (21:41 +0200)
commitafbae3e9f23dc6682d48a1cc3585e8429ef07d8b
tree759d17f7ae3b33b6d6578bf458a4625989ecffab
parentc250bf671b89768ed27984defe9b5af262618e42
path-util: fix path_simplify() with kill_dots and "."

Previously, together with kill_dots true, patch like
".", "./.", ".//.//" would all return an empty string.

That is wrong. There must be one "." left to reference
the current directory.

Also, the comment with examples was wrong.
src/basic/path-util.c
src/test/test-path-util.c