GNOME Bugzilla – Bug 152751
g_resolve_path
Last modified: 2004-12-22 21:47:04 UTC
I would like to see a function in glib to simplify a filename in one or more of the following ways: 1. Remove "." components such as in "./foo" and "foo/./bar", but probably not in "foo/." 2. Get rid of double slashes as in "foo//bar", but not in "//foo/bar" (where it means something else). 2a. Syntactically remove ".." and the preceding component. --or-- 2b. Remove ".." if the preceding component is not a symlink. 3. Expand symlinks. 4. Make absolute. I can code this up fairly easily if we can agree that it is a good idea and agree on an API.
*** This bug has been marked as a duplicate of 111848 ***