]> git.ipfire.org Git - thirdparty/systemd.git/commit
path-util: some updates to path_make_relative()
authorLennart Poettering <lennart@poettering.net>
Mon, 2 Oct 2017 08:51:19 +0000 (10:51 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 Oct 2017 15:41:44 +0000 (17:41 +0200)
commit2a5beb669f62299bfa2543765d3edf8885f9eb55
tree8c6c192fd1fafa60c40c414c41e3666a098697ea
parent091e9efed3f417bdd8bdee814d8676757ffb19db
path-util: some updates to path_make_relative()

Don't miscount number of "../" to generate, if we "." is included in an
input path.

Also, refuse if we encounter "../" since we can't possibly follow that
up properly, without file system access.

Some other modernizations.
src/basic/path-util.c
src/test/test-path-util.c