Fixed issue 127 : program path under unix was stored relative when launching the program with "./grafx2" in the dev directory, so font loading failed when changing directory (loading a pic, for example).

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@727 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2009-04-07 12:28:53 +00:00
parent 15e11b7144
commit 385a99d1f6
2 changed files with 9 additions and 2 deletions

4
io.c
View File

@@ -194,9 +194,9 @@ void Extract_filename(char *dest, const char *source)
// Récupère la partie "répertoire+/" d'un chemin.
void Extract_path(char *dest, const char *source)
{
char * position;
char * position=NULL;
strcpy(dest,source);
realpath(source,dest);
position = Find_last_slash(dest);
if (position)
*(position+1) = '\0';