After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 152751 - g_resolve_path
g_resolve_path
Status: RESOLVED DUPLICATE of bug 111848
Product: glib
Classification: Platform
Component: general
2.5.x
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2004-09-15 19:55 UTC by Morten Welinder
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2004-09-15 19:55:36 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.
Comment 1 Matthias Clasen 2004-10-05 19:53:35 UTC

*** This bug has been marked as a duplicate of 111848 ***