mirror of
https://github.com/Febbweiss/logstash-forwarder-java.git
synced 2026-03-04 14:15:42 +00:00
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/
|
/bin/
|
||||||
/testFileReader1.txt
|
/testFileReader1.txt
|
||||||
/state2.json
|
/state2.json
|
||||||
|
.idea/
|
||||||
|
logstash-forwarder-java.iml
|
||||||
@@ -298,7 +298,8 @@ public class FileWatcher {
|
|||||||
public void onFileDelete(File file) {
|
public void onFileDelete(File file) {
|
||||||
try {
|
try {
|
||||||
logger.debug("Delete detected on file : " + file.getCanonicalPath());
|
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) {
|
} catch (IOException e) {
|
||||||
logger.error("Caught IOException : " + e.getMessage());
|
logger.error("Caught IOException : " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user