
20 Feb
2014
20 Feb
'14
11:49 p.m.
2014-02-20 18:58 GMT+01:00 Johan Engelen <jbc.engelen@...2592...>:
- Please read this about "realpath"
http://insanecoding.blogspot.ch/2007/11/pathmax-simply-isnt.html
The POSIX.1-2001 version of realpath() is broken, but the POSIX.1-2008 version allows you to pass NULL as the second argument, which will allocate a new buffer with malloc() in the same manner as strdup(). This is supported on both Linux and OSX.
On Windows (MinGW), realpath() is not available at all and should be reimplemented with _wfullpath + g_utf16_to_utf8.
However, I'm not really sure why we would need to use realpath() or other means of path canonicalization at all. If the user wants to access an external document through a symlink, we should not interfere with that.
Regards, Krzysztof