mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
[FIX] Исправление ошибки при перезаписе файла
This commit is contained in:
parent
227d0db778
commit
7f6a83fb66
1 changed files with 5 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
@ -82,6 +83,10 @@ public void postDiff(UpdateRequest request, UpdateRequestEvent e, HashedDir.Diff
|
|||
LogHelper.debug("Copy file %s to %s", ret.toAbsolutePath().toString(), source.toAbsolutePath().toString());
|
||||
//Let's go!
|
||||
Files.copy(ret, source);
|
||||
try(InputStream input = IOHelper.newInput(ret))
|
||||
{
|
||||
IOHelper.transfer(input, source);
|
||||
}
|
||||
removed.add(path.replace('\\', '/'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue