mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] Закоментирован фикс verifyHDir
This commit is contained in:
parent
b3079b83dc
commit
446acf2181
1 changed files with 3 additions and 2 deletions
|
@ -543,7 +543,7 @@ public static void verifyHDir(Path dir, HashedDir hdir, FileNameMatcher matcher,
|
||||||
HashedDir.Diff diff = hdir.diff(currentHDir, matcher);
|
HashedDir.Diff diff = hdir.diff(currentHDir, matcher);
|
||||||
if (!diff.isSame())
|
if (!diff.isSame())
|
||||||
{
|
{
|
||||||
AtomicBoolean isFoundFile = new AtomicBoolean(false);
|
/*AtomicBoolean isFoundFile = new AtomicBoolean(false);
|
||||||
diff.extra.walk(File.separator, (e,k,v) -> {
|
diff.extra.walk(File.separator, (e,k,v) -> {
|
||||||
if(v.getType().equals(HashedEntry.Type.FILE)) { LogHelper.error("Extra file %s", e); isFoundFile.set(true); }
|
if(v.getType().equals(HashedEntry.Type.FILE)) { LogHelper.error("Extra file %s", e); isFoundFile.set(true); }
|
||||||
else LogHelper.error("Extra %s", e);
|
else LogHelper.error("Extra %s", e);
|
||||||
|
@ -552,7 +552,8 @@ public static void verifyHDir(Path dir, HashedDir hdir, FileNameMatcher matcher,
|
||||||
if(v.getType().equals(HashedEntry.Type.FILE)) { LogHelper.error("Mismatch file %s", e); isFoundFile.set(true); }
|
if(v.getType().equals(HashedEntry.Type.FILE)) { LogHelper.error("Mismatch file %s", e); isFoundFile.set(true); }
|
||||||
else LogHelper.error("Mismatch %s", e);
|
else LogHelper.error("Mismatch %s", e);
|
||||||
});
|
});
|
||||||
if(isFoundFile.get()) throw new SecurityException(String.format("Forbidden modification: '%s'", IOHelper.getFileName(dir)));
|
if(isFoundFile.get())*/
|
||||||
|
throw new SecurityException(String.format("Forbidden modification: '%s'", IOHelper.getFileName(dir)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue