Support 7z read

This commit is contained in:
tarsin committed 2022-05-23 07:31:58 +08:00
1 parent cde39812ce
commit f41f4dd8ba
2 files changed
+17 -3

No files matched your search

@@ -59,8 +59,13 @@ public class UriArchiveAccessor implements Closeable {
return Os.fstat(fd).st_size;
}
public void seek(long pos) throws IOException, ErrnoException {
Os.lseek(fd, pos, OsConstants.SEEK_SET);
public long seek(long pos, int whence) throws IOException, ErrnoException {
try {
return Os.lseek(fd, pos, whence);
} catch (Exception e) {
e.printStackTrace();
return -30;
}
}
public void rewind() throws IOException, ErrnoException {