Fixed: #1615 Turning off Checking for modifications disables SWF loading

This commit is contained in:
Jindra Petřík
2021-02-25 07:50:27 +01:00
parent a508e4d6db
commit 8145ada828
2 changed files with 10 additions and 8 deletions

View File

@@ -1337,14 +1337,16 @@ public class Main {
String fileName = si.getFile();
if (fileName != null) {
Configuration.addRecentFile(fileName);
try {
File dir = new File(fileName).getParentFile();
if (!watchedDirectories.containsValue(dir)) {
WatchKey key = dir.toPath().register(watcher, StandardWatchEventKinds.ENTRY_MODIFY);
watchedDirectories.put(key, dir);
if (watcher != null) {
try {
File dir = new File(fileName).getParentFile();
if (!watchedDirectories.containsValue(dir)) {
WatchKey key = dir.toPath().register(watcher, StandardWatchEventKinds.ENTRY_MODIFY);
watchedDirectories.put(key, dir);
}
} catch (IOException ex) {
//ignore
}
} catch (IOException ex) {
//ignore
}
}
}
@@ -1714,7 +1716,6 @@ public class Main {
}
}
if (watcher != null) {
watcherWorker = new SwingWorker() {
@Override