[FIX] Фиксы максимального веса.

This commit is contained in:
Zaxar163 2019-07-03 17:30:47 +03:00
parent e30e749351
commit 56e6403acd
3 changed files with 3 additions and 3 deletions

View file

@ -915,7 +915,7 @@ public void syncUpdatesDir(Collection<String> dirs) throws IOException {
private void processUpdate(Path updateDir, HashedDir updateHDir, String name) throws IOException { private void processUpdate(Path updateDir, HashedDir updateHDir, String name) throws IOException {
updateHDir.walk(IOHelper.CROSS_SEPARATOR, (path, filename, entry) -> { updateHDir.walk(IOHelper.CROSS_SEPARATOR, (path, filename, entry) -> {
if (entry.getType().equals(HashedEntry.Type.DIR)) { if (entry.getType().equals(HashedEntry.Type.DIR)) {
if (entry.size() < IOHelper.MB32) { if (entry.size() < IOHelper.MB16) {
Path p = updateDir.resolve(path); Path p = updateDir.resolve(path);
Path out = optimizedUpdatesDir.resolve(name).resolve(path); Path out = optimizedUpdatesDir.resolve(name).resolve(path);
try (ZipOutputStream compressed = new ZipOutputStream(IOHelper.newOutput(out))) { try (ZipOutputStream compressed = new ZipOutputStream(IOHelper.newOutput(out))) {

View file

@ -210,7 +210,7 @@ public UpdateRequestEvent requestDo(StandartClientWebSocketService service) thro
} catch (IOException ex) { } catch (IOException ex) {
LogHelper.error(ex); LogHelper.error(ex);
} }
if (entry.size() < IOHelper.MB32) { if (entry.size() < IOHelper.MB16) {
adds.add(new ListDownloader.DownloadTask(path, -1, true)); adds.add(new ListDownloader.DownloadTask(path, -1, true));
return HashedDir.WalkAction.SKIP_DIR; return HashedDir.WalkAction.SKIP_DIR;
} }

View file

@ -62,7 +62,7 @@
import pro.gravit.launcher.LauncherAPI; import pro.gravit.launcher.LauncherAPI;
public final class IOHelper { public final class IOHelper {
public static final long MB32 = 1 << 25; public static final long MB16 = 1 << 24;
private static final class DeleteDirVisitor extends SimpleFileVisitor<Path> { private static final class DeleteDirVisitor extends SimpleFileVisitor<Path> {
private final Path dir; private final Path dir;
private final boolean self; private final boolean self;