- implemented FS_FullPath() function for POSIX

This commit is contained in:
alexey.lysiuk 2023-08-23 14:57:22 +03:00
parent bfefc12427
commit 79be69ec4a

View file

@ -63,6 +63,8 @@ enum
#ifndef _WIN32
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
#include <fnmatch.h>
#include <sys/stat.h>
@ -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;
}