diff --git a/src/common/filesystem/source/fs_findfile.cpp b/src/common/filesystem/source/fs_findfile.cpp index 086642bb5..689a5d644 100644 --- a/src/common/filesystem/source/fs_findfile.cpp +++ b/src/common/filesystem/source/fs_findfile.cpp @@ -63,6 +63,8 @@ enum #ifndef _WIN32 +#include +#include #include #include #include @@ -175,7 +177,11 @@ static int FS_FindAttr(findstate_t *const fileinfo) std::string FS_FullPath(const char* directory) { - // todo + char fullpath[PATH_MAX]; + + if (realpath(directory, fullpath) != nullptr) + return fullpath; + return directory; }