mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-11 01:59:41 +03:00
[FIX] Windows must die
This commit is contained in:
parent
579761bcbd
commit
b9e8f48065
1 changed files with 5 additions and 6 deletions
|
@ -125,13 +125,12 @@ private void processKey(WatchKey key) throws IOException {
|
||||||
LogHelper.debug("DirWatcher event %s", String.join("/", stringPath));
|
LogHelper.debug("DirWatcher event %s", String.join("/", stringPath));
|
||||||
if (matcher != null && !matcher.shouldVerify(stringPath))
|
if (matcher != null && !matcher.shouldVerify(stringPath))
|
||||||
continue; // Exclusion; should not be verified
|
continue; // Exclusion; should not be verified
|
||||||
|
|
||||||
// Verify is REALLY modified (not just attributes)
|
// Verify is REALLY modified (not just attributes)
|
||||||
if (kind.equals(StandardWatchEventKinds.ENTRY_MODIFY)) {
|
//if (kind.equals(StandardWatchEventKinds.ENTRY_MODIFY)) {
|
||||||
HashedEntry entry = hdir.resolve(stringPath);
|
// HashedEntry entry = hdir.resolve(stringPath);
|
||||||
if (entry != null && (entry.getType() != Type.FILE || ((HashedFile) entry).isSame(path, digest)))
|
// if (entry != null && (entry.getType() != Type.FILE || ((HashedFile) entry).isSame(path, digest)))
|
||||||
continue; // Modified attributes, not need to worry :D
|
// continue; // Modified attributes, not need to worry :D
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Forbidden modification!
|
// Forbidden modification!
|
||||||
throw new SecurityException(String.format("Forbidden modification (%s, %d times): '%s'", kind, event.count(), path));
|
throw new SecurityException(String.format("Forbidden modification (%s, %d times): '%s'", kind, event.count(), path));
|
||||||
|
|
Loading…
Reference in a new issue