mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] Создание диреткорий
This commit is contained in:
parent
b7dfa457ed
commit
877c26199d
1 changed files with 5 additions and 2 deletions
|
@ -40,7 +40,10 @@ public void postDiff(UpdateRequest request, UpdateRequestEvent e, HashedDir.Diff
|
|||
AtomicReference<NewLauncherSettings.HashedStoreEntry> lastEn = new AtomicReference<>(null);
|
||||
ArrayList<String> removed = new ArrayList<>();
|
||||
diff.mismatch.walk(File.separator, (path, name, entry) -> {
|
||||
if(entry.getType() == HashedEntry.Type.DIR) return HashedDir.WalkAction.CONTINUE;
|
||||
if(entry.getType() == HashedEntry.Type.DIR) {
|
||||
Files.createDirectories(request.getDir().resolve(path));
|
||||
return HashedDir.WalkAction.CONTINUE;
|
||||
}
|
||||
HashedFile file = (HashedFile) entry;
|
||||
//Первый экспериментальный способ - честно обходим все возможные Store
|
||||
Path ret = null;
|
||||
|
@ -78,7 +81,7 @@ public void postDiff(UpdateRequest request, UpdateRequestEvent e, HashedDir.Diff
|
|||
Path source = request.getDir().resolve(path);
|
||||
LogHelper.debug("Copy file %s to %s", ret.toAbsolutePath().toString(), source.toAbsolutePath().toString());
|
||||
//Let's go!
|
||||
Files.copy(source, ret);
|
||||
Files.copy(ret, source);
|
||||
removed.add(path.concat(File.separator).concat(name));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue