Add bt_common_normalize_path()
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 29 May 2017 22:48:48 +0000 (18:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 9 Jun 2017 20:58:12 +0000 (16:58 -0400)
commite49a18d18cb63285c22b327a8660d7ab741a347c
treeb019a8e8d9d2fcdd1a801feccd2f6620318d45a1
parent59a09b0ee1d2e2cb8430d10cbea84b789d184e67
Add bt_common_normalize_path()

This new function does a part of realpath()'s job: it resolves `..` and
`.` in the path, resolves a relative path with a custom working
directory or the current working directory, and removes consecutive
separators (`/` or `\` depending on the platform) and the last
separator. The function always returns an absolute path. The function
does NOT resolve symbolic links.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
common/common.c
include/babeltrace/common-internal.h
This page took 0.024749 seconds and 4 git commands to generate.