- if(pathname[0] == '/')
- {
- strcat(abs_pathname, pathname);
- return;
- }
-
- if(!getcwd(abs_pathname, size)){
- g_warning("Can not get current working directory\n");
- strcat(abs_pathname, pathname);
+ if ( realpath (pathname, abs_pathname) != NULL)
+ return;
+ else
+ {
+ // FIXME : Path is wrong, is it ok to return the pathname unmodified ?
+ strcpy(abs_pathname, pathname);