mirror of
https://github.com/Febbweiss/logstash-forwarder-java.git
synced 2026-03-05 06:35:44 +00:00
Fix bug #8.
This commit is contained in:
@@ -314,6 +314,9 @@ public class FileWatcher {
|
||||
List<File> markedList = null;
|
||||
for(File file : oldWatchMap.keySet()) {
|
||||
FileState state = oldWatchMap.get(file);
|
||||
if(state.getRandomAccessFile() == null) {
|
||||
state.setDeleted();
|
||||
}
|
||||
if(state.isDeleted()) {
|
||||
if(! file.exists()) {
|
||||
if(markedList == null) {
|
||||
@@ -328,8 +331,7 @@ public class FileWatcher {
|
||||
}
|
||||
if(markedList != null) {
|
||||
for(File file : markedList) {
|
||||
FileState state = oldWatchMap.remove(file);
|
||||
|
||||
oldWatchMap.remove(file);
|
||||
logger.trace("\tFile : " + file + " removed");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user