Files can be empty.

This commit is contained in:
2016-07-27 03:22:02 +01:00
parent 3c8f20a5c0
commit b797dfd526

View File

@@ -59,8 +59,14 @@ namespace DiscImageChef.Filesystems.LisaFS
public override Errno Read(string path, long offset, long size, ref byte[] buf) public override Errno Read(string path, long offset, long size, ref byte[] buf)
{ {
if(offset < 0 || size < 0) if(size == 0)
return Errno.EINVAL; {
buf = new byte[0];
return Errno.NoError;
}
if(offset < 0)
return Errno.InvalidArgument;
Int16 fileId; Int16 fileId;
bool isDir; bool isDir;