pull/2/head
Evan Hemsley 2020-01-17 01:45:41 -08:00
parent 88a1c032aa
commit ae0744e1f6
3 changed files with 9 additions and 2 deletions

View File

@ -179,7 +179,7 @@ namespace SharpPhysFS
{ {
var strPtr = (IntPtr)Marshal.PtrToStructure(ptr, typeof(IntPtr)); var strPtr = (IntPtr)Marshal.PtrToStructure(ptr, typeof(IntPtr));
var str = Marshal.PtrToStringAnsi(strPtr); var str = Marshal.PtrToStringAnsi(strPtr);
if (System.IO.File.Exists(str)) { yield return str; } // the lib seems to be returning directories. boo! if (!IsDirectory(str)) { yield return str; } // the lib seems to be returning directories. boo!
} }
Interop.PHYSFS_freeList(files); Interop.PHYSFS_freeList(files);
} }

View File

@ -11,5 +11,5 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<Import Project=".\build\copylibs.targets" /> <Import Project=".\targets\copylibs.targets" />
</Project> </Project>

7
SharpPhysFS/app.config Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="physfs" os="windows" target="physfs.dll" />
<dllmap dll="physfs" os="osx" target="libphysfs.dylib"/>
<dllmap dll="physfs" os="linux,freebsd,netbsd" target="libphysfs.so"/>
<dllmap dll="physfs" os="openbsd" target="libphysfs.so"/>
</configuration>