
2014-02-21 2:29 GMT+01:00 Martin Owens <doctormo@...400...>:
On Fri, 2014-02-21 at 00:49 +0100, Krzysztof Kosiński wrote:
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.
If you pass a non-normalised path to f_file_test then it fails. The code in question is a filtered output rather than a property which we would save. The local and non-normalised path would continue to be used in the toString function and only file existence checking and opening would use getFullPath.
I really doubt this is the case.
#include <glib.h> #include <stdio.h>
int main() { char const *path = "../junk/filetest.c"; if (g_file_test(path, G_FILE_TEST_EXISTS)) { printf("%s exists\n", path); } else { printf("%s does not exist\n", path); } return 0; }
When I save this as /home/tweenk/src/junk/filetest.c, compile and run it in that directory, it prints "../junk/filetest.c exists". (This is on Ubuntu 13.10.) Are there problems with g_file_test on Windows?
Regards, Krzysztof