mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-05-29 13:00:15 +02:00
5.39
Upload resume bug fix
This commit is contained in:
parent
3d78a1d212
commit
ac98de407d
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.tonikelope</groupId>
|
<groupId>com.tonikelope</groupId>
|
||||||
<artifactId>MegaBasterd</artifactId>
|
<artifactId>MegaBasterd</artifactId>
|
||||||
<version>5.38</version>
|
<version>5.39</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -47,7 +47,7 @@ import java.io.File;
|
|||||||
*/
|
*/
|
||||||
public final class MainPanel {
|
public final class MainPanel {
|
||||||
|
|
||||||
public static final String VERSION = "5.38";
|
public static final String VERSION = "5.39";
|
||||||
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
||||||
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
||||||
public static final int STREAMER_PORT = 1337;
|
public static final int STREAMER_PORT = 1337;
|
||||||
|
@ -1199,7 +1199,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
|||||||
public long calculateLastUploadedChunk(long bytes_read) {
|
public long calculateLastUploadedChunk(long bytes_read) {
|
||||||
|
|
||||||
if (bytes_read > 3584 * 1024) {
|
if (bytes_read > 3584 * 1024) {
|
||||||
return 7 + (long) Math.ceil((float) (bytes_read - 3584 * 1024) / (1024 * 1024 * Upload.CHUNK_SIZE_MULTI));
|
return 7 + (long) Math.floor((float) (bytes_read - 3584 * 1024) / (1024 * 1024 * Upload.CHUNK_SIZE_MULTI));
|
||||||
} else {
|
} else {
|
||||||
long i = 0, tot = 0;
|
long i = 0, tot = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user