Don't stop edits for old clipboards, attempt to load them anyway (for now)

Dieser Commit ist enthalten in:
dordsor21 2021-09-24 09:32:49 +01:00
Ursprung 8593c2df9f
Commit bfd9e5b347
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -150,9 +150,15 @@ public class DiskOptimizedClipboard extends LinearClipboard implements Closeable
private static BlockVector3 readSize(File file) {
try (DataInputStream is = new DataInputStream(new FileInputStream(file))) {
int version = is.readChar();
if (version > VERSION) {
throw new UnsupportedOperationException("Unsupported clipboard-on-disk version: " + version);
int x;
if (version != 1) {
x = version;
} else {
x = is.readChar();
}
// if (version > VERSION) {
// throw new UnsupportedOperationException("Unsupported clipboard-on-disk version: " + version);
// }
return BlockVector3.at(is.readChar(), is.readChar(), is.readChar());
} catch (IOException e) {
e.printStackTrace();