diff options
-rw-r--r-- | src/core/lt_path.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/lt_path.c b/src/core/lt_path.c index 76c465b..d3f7ec1 100644 --- a/src/core/lt_path.c +++ b/src/core/lt_path.c @@ -291,6 +291,21 @@ static int lt_dlpathopen_locked( memcpy(path,module,mlen); + if (path[0] == '/') { + if ((fdmod = open(path,SLTDL_MODULE_OPEN_OPTIONS,0)) >= 0) { + if (mpath) { + if (!(*mpath = realpath(path,0))) { + close(fdmod); + return lt_setstatus(-1,SLTDL_SYSTEM_ERROR); + } + } + + return lt_setstatus(fdmod,SLTDL_OK); + } + + return lt_setstatus(-1,SLTDL_PATH_NO_ENTRY); + } + for (ppath=lt_pathv; ppath && *ppath; ppath++) { fdat = open(*ppath,O_RDONLY|O_DIRECTORY|O_CLOEXEC,0); |