mirror of
https://github.com/Febbweiss/logstash-forwarder-java.git
synced 2026-03-04 22:25:39 +00:00
Merge pull request #12 from pichljan/master
Repaired error caused by deletion of file with insufficient permissions.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,3 +2,5 @@
|
||||
/bin/
|
||||
/testFileReader1.txt
|
||||
/state2.json
|
||||
.idea/
|
||||
logstash-forwarder-java.iml
|
||||
@@ -298,7 +298,8 @@ public class FileWatcher {
|
||||
public void onFileDelete(File file) {
|
||||
try {
|
||||
logger.debug("Delete detected on file : " + file.getCanonicalPath());
|
||||
oldWatchMap.get(file).setDeleted();
|
||||
FileState state = oldWatchMap.get(file);
|
||||
if (state != null) state.setDeleted();
|
||||
} catch (IOException e) {
|
||||
logger.error("Caught IOException : " + e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user