about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tools/fileutils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tools/fileutils.c b/src/tools/fileutils.c
index c9765740..af6634a0 100755
--- a/src/tools/fileutils.c
+++ b/src/tools/fileutils.c
@@ -57,8 +57,11 @@ char* ResolveFile(const char* filename, path_collection_t* paths)
         } else
             strcpy(p, paths->paths[i]);
         strcat(p, filename);
-        if(FileExist(p, IS_FILE))
-            return realpath(p, NULL);
+        if(FileExist(p, IS_FILE)) {
+            char p2[MAX_PATH];
+            realpath(p, p2);
+            return box_strdup(p2);
+        }
     }
 
     return box_strdup(filename); //NULL;