Fix checking downloaded image
This commit is contained in:
1 parent
be7478ecec
commit
00211e581a
1 file changed
+6
@@ -1394,11 +1394,17 @@ public final class SpiderQueen implements Runnable {
|
||||
isPipe.obtain();
|
||||
InputStream inputStream = new BufferedInputStream(isPipe.open());
|
||||
boolean isPlainTxt = true;
|
||||
int j = 0;
|
||||
for (; ; ) {
|
||||
int b = inputStream.read();
|
||||
if (b == -1) {
|
||||
break;
|
||||
}
|
||||
// Skip first three bytes
|
||||
if (j < 3) {
|
||||
j++;
|
||||
continue;
|
||||
}
|
||||
if (b > 126) {
|
||||
isPlainTxt = false;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user