Skip to content

Commit af720d5

Browse files
committed
Ignore CRC32 icon ID collisions in uploadIcon and uploadIconDirect
If a query attempts to upload an icon that already exists on the server, the query should ignore the "file already exists" error and return the icon ID as if the upload had succeeded. The chance of an actual CRC32 collision, where two different icons are mapped to the same icon ID, is so tiny that we may as well ignore it.
1 parent 1861530 commit af720d5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/com/github/theholywaffle/teamspeak3/TS3ApiAsync.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5132,7 +5132,7 @@ public CommandFuture<Long> uploadIconDirect(byte[] data) {
51325132
public void handleSuccess(Void ignored) {
51335133
future.set(iconId);
51345134
}
5135-
}).forwardFailure(future);
5135+
}).onFailure(transformError(future, 2050, iconId));
51365136

51375137
return future;
51385138
}

0 commit comments

Comments
 (0)