fix: some stupid mistakes in FS
This commit is contained in:
parent
1b2068a274
commit
7a301eba8f
@ -18,7 +18,7 @@ public interface File {
|
||||
setPtr(0, 0);
|
||||
|
||||
byte[] res = new byte[(int)len];
|
||||
read(res);
|
||||
len = read(res);
|
||||
|
||||
return new String(res);
|
||||
}
|
||||
|
@ -35,9 +35,9 @@ public class PhysicalFile implements File {
|
||||
if (file == null || !perms.readable) throw new FilesystemException(filename, FSCode.NO_PERMISSIONS_R);
|
||||
|
||||
try {
|
||||
if (pos == 1) pos += file.getFilePointer();
|
||||
else if (pos == 2) pos += file.length();
|
||||
file.seek(pos);
|
||||
if (pos == 1) offset += file.getFilePointer();
|
||||
else if (pos == 2) offset += file.length();
|
||||
file.seek(offset);
|
||||
}
|
||||
catch (IOException e) { throw new FilesystemException(filename, FSCode.NO_PERMISSIONS_R); }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user