File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,12 @@ class LinuxLoader : ILibraryLoader
49
49
50
50
public IntPtr Load ( string dllToLoad )
51
51
{
52
- var filename = $ "lib{ dllToLoad } .so";
53
52
ClearError ( ) ;
54
- var res = dlopen ( filename , RTLD_NOW | RTLD_GLOBAL ) ;
53
+ var res = dlopen ( dllToLoad , RTLD_NOW | RTLD_GLOBAL ) ;
55
54
if ( res == IntPtr . Zero )
56
55
{
57
56
var err = GetError ( ) ;
58
- throw new DllNotFoundException ( $ "Could not load { filename } with flags RTLD_NOW | RTLD_GLOBAL: { err } ") ;
57
+ throw new DllNotFoundException ( $ "Could not load { dllToLoad } with flags RTLD_NOW | RTLD_GLOBAL: { err } ") ;
59
58
}
60
59
61
60
return res ;
@@ -120,13 +119,12 @@ class DarwinLoader : ILibraryLoader
120
119
121
120
public IntPtr Load ( string dllToLoad )
122
121
{
123
- var filename = $ "lib{ dllToLoad } .dylib";
124
122
ClearError ( ) ;
125
- var res = dlopen ( filename , RTLD_NOW | RTLD_GLOBAL ) ;
123
+ var res = dlopen ( dllToLoad , RTLD_NOW | RTLD_GLOBAL ) ;
126
124
if ( res == IntPtr . Zero )
127
125
{
128
126
var err = GetError ( ) ;
129
- throw new DllNotFoundException ( $ "Could not load { filename } with flags RTLD_NOW | RTLD_GLOBAL: { err } ") ;
127
+ throw new DllNotFoundException ( $ "Could not load { dllToLoad } with flags RTLD_NOW | RTLD_GLOBAL: { err } ") ;
130
128
}
131
129
132
130
return res ;
You can’t perform that action at this time.
0 commit comments