From mboxrd@z Thu Jan 1 00:00:00 1970 From: raphael.beamonte@gmail.com (=?UTF-8?q?Rapha=C3=ABl=20Beamonte?=) Date: Thu, 7 Nov 2013 23:32:12 -0500 Subject: [lttng-dev] [lttng-tools PATCH 0/2] utils_expand_path as realpath(3) for non-existing directories Message-ID: <1383885134-21397-1-git-send-email-raphael.beamonte@gmail.com> The utils_expand_path function of lttng-tools, in src/common/utils.c, was meant to replace the realpath(3) function of glibc in cases we want to allow non-existing paths, such as specifying the output directory for a trace. While using the lttng-tools command line to create some traces, I found out that some use cases weren't working. For instance, using paths like "foo", "bar/" or "bar/foo" when the "bar" directory does not exist was not working. This series of two (2) patches aims to correct the behavior of the utils_expand_path function, introducing a new utils_resolve_relative function meant to resolve relative paths ("./" and "../") in the middle of a path string. Rapha?l Beamonte (2): Introduce a new utils_resolve_relative function Correct the behavior of the utils_expand_path function src/common/utils.c | 120 +++++++++++++++++++++++++++++++++++++++++++--------- src/common/utils.h | 1 + 2 files changed, 100 insertions(+), 21 deletions(-) -- 1.7.10.4