================= idFileSystemLocal::FindDLL ================= */
| 3669 | ================= |
| 3670 | */ |
| 3671 | void idFileSystemLocal::FindDLL( const char *name, char _dllPath[ MAX_OSPATH ] ) { |
| 3672 | idFile *dllFile = NULL; |
| 3673 | char dllName[MAX_OSPATH]; |
| 3674 | idStr dllPath; |
| 3675 | |
| 3676 | sys->DLL_GetFileName( name, dllName, MAX_OSPATH ); |
| 3677 | |
| 3678 | if (!serverPaks.Num() && Sys_GetPath(PATH_EXE, dllPath)) { |
| 3679 | // from executable directory first - this is handy for developement |
| 3680 | dllPath.StripFilename( ); |
| 3681 | dllPath.AppendPath( dllName ); |
| 3682 | dllFile = OpenExplicitFileRead( dllPath ); |
| 3683 | } |
| 3684 | |
| 3685 | if ( !dllFile && !serverPaks.Num() ) |
| 3686 | dllFile = OpenFileReadFlags( dllName, FSFLAG_SEARCH_DIRS ); |
| 3687 | |
| 3688 | if ( dllFile ) { |
| 3689 | dllPath = dllFile->GetFullPath( ); |
| 3690 | CloseFile( dllFile ); |
| 3691 | dllFile = NULL; |
| 3692 | } else { |
| 3693 | dllPath = ""; |
| 3694 | } |
| 3695 | idStr::snPrintf( _dllPath, MAX_OSPATH, "%s", dllPath.c_str() ); |
| 3696 | } |
| 3697 | |
| 3698 | /* |
| 3699 | ================ |
no test coverage detected