fix: some stupid mistakes in FS

This commit is contained in:
TopchetoEU 2023-12-24 14:27:27 +02:00
parent 1b2068a274
commit 7a301eba8f
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4
2 changed files with 43 additions and 43 deletions

View File

@ -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);
}

View File

@ -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); }
}