
On Dec 20, 2003, at 10:29 PM, MenTaLguY wrote:
On Sat, 2003-12-20 at 21:12, bulia byak wrote:
Unfortunately this is not smart enough. If I open "../filename.svg", the resulting "absolute" pathname will have ".." in the middle. Which is why I was asking if there exists a smart absolute path function that normalizes paths. Or can't the OS return the absolute path of a given file?
I see. Good point. I don't think there are really any OS facilities for doing that, and certainly fewer portable ones.
Generally, you're just kind of expected to know what the rules for constructing a path are on your platform and do it yourself.
Sucks for cross-platform stuff.
Hmmm... Java does have this.
Of course, they have two concepts. "Absolute", which includes the ".."s, and "Canonical", which does not.
The latter is what you want. Maybe we need to go add that to glib.