mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] Создание директорий UpdateRequest'ом
This commit is contained in:
parent
24a453f338
commit
b3079b83dc
1 changed files with 9 additions and 1 deletions
|
@ -174,11 +174,19 @@ public UpdateRequestEvent requestDo() throws Exception {
|
|||
HashedDir.Diff diff = e.hdir.diff(localDir, matcher);
|
||||
final List<ListDownloader.DownloadTask> adds = new ArrayList<>();
|
||||
diff.mismatch.walk(IOHelper.CROSS_SEPARATOR, (path, name, entry) -> {
|
||||
if(entry.getType() == HashedEntry.Type.FILE) {
|
||||
if(entry.getType().equals(HashedEntry.Type.FILE)) {
|
||||
HashedFile file = (HashedFile) entry;
|
||||
totalSize += file.size;
|
||||
adds.add(new ListDownloader.DownloadTask(path, file.size));
|
||||
}
|
||||
else if(entry.getType().equals(HashedEntry.Type.DIR))
|
||||
{
|
||||
try {
|
||||
Files.createDirectories(dir.resolve(path));
|
||||
} catch (IOException ex) {
|
||||
LogHelper.error(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
totalSize = diff.mismatch.size();
|
||||
startTime = Instant.now();
|
||||
|
|
Loading…
Reference in a new issue