mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-31 20:59:54 +03:00
[ANY] Выводим стектрейс, если DirBridge.move получил аргументом null.
This commit is contained in:
parent
5ad1d58f62
commit
6077a51fd4
2 changed files with 7 additions and 1 deletions
|
@ -60,7 +60,6 @@ private boolean checkSecure(String hash, String salt) {
|
|||
byte[] normal_hash = SecurityHelper.digest(SecurityHelper.DigestAlgorithm.SHA256,
|
||||
server.runtime.clientCheckSecret.concat(".").concat(salt));
|
||||
byte[] launcher_hash = Base64.getDecoder().decode(hash);
|
||||
//LogHelper.debug("[checkSecure] %s vs %s", Arrays.toString(normal_hash), Arrays.toString(launcher_hash));
|
||||
return Arrays.equals(normal_hash, launcher_hash);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,13 @@ public class DirBridge {
|
|||
}
|
||||
|
||||
public static void move(Path newDir) throws IOException {
|
||||
if (newDir == null) {
|
||||
LogHelper.debug("Invalid dir (null)");
|
||||
if (LogHelper.isDevEnabled())
|
||||
LogHelper.dev(LogHelper.toString(new Throwable("Check stack of call DirBridge with null path...")));
|
||||
return;
|
||||
}
|
||||
LogHelper.dev(newDir.toString());
|
||||
IOHelper.move(dirUpdates, newDir);
|
||||
dirUpdates = newDir;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue