mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-19 14:33:04 +03:00
[FIX] Фиксы максимального веса.
This commit is contained in:
parent
e30e749351
commit
56e6403acd
3 changed files with 3 additions and 3 deletions
|
@ -915,7 +915,7 @@ public void syncUpdatesDir(Collection<String> dirs) throws IOException {
|
|||
private void processUpdate(Path updateDir, HashedDir updateHDir, String name) throws IOException {
|
||||
updateHDir.walk(IOHelper.CROSS_SEPARATOR, (path, filename, entry) -> {
|
||||
if (entry.getType().equals(HashedEntry.Type.DIR)) {
|
||||
if (entry.size() < IOHelper.MB32) {
|
||||
if (entry.size() < IOHelper.MB16) {
|
||||
Path p = updateDir.resolve(path);
|
||||
Path out = optimizedUpdatesDir.resolve(name).resolve(path);
|
||||
try (ZipOutputStream compressed = new ZipOutputStream(IOHelper.newOutput(out))) {
|
||||
|
|
|
@ -210,7 +210,7 @@ public UpdateRequestEvent requestDo(StandartClientWebSocketService service) thro
|
|||
} catch (IOException ex) {
|
||||
LogHelper.error(ex);
|
||||
}
|
||||
if (entry.size() < IOHelper.MB32) {
|
||||
if (entry.size() < IOHelper.MB16) {
|
||||
adds.add(new ListDownloader.DownloadTask(path, -1, true));
|
||||
return HashedDir.WalkAction.SKIP_DIR;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
import pro.gravit.launcher.LauncherAPI;
|
||||
|
||||
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 final Path dir;
|
||||
private final boolean self;
|
||||
|
|
Loading…
Reference in a new issue