Closed tvasenin closed 3 years ago
Thanks @tvasenin for finding and reporting this issue.
Proposal: if we get
ENTRY_CREATE
event for a file, but can't hash it, still report the CREATE event without updatingpathHashes
. An additionalFiles.notExists()
check could also be employed to distinguish between "file has already been deleted" and "file exists but couldn't be accessed" situations.
Seems like a reasonable approach. Also the additional check only needs to be performed if hashing is enabled.
Do you mind submitting a PR?
@gmethvin submitted PR #57.
Released the fix in 0.10.1
When I copy-paste a file into target dir on Windows,
CREATE
event is not reported.This happens because at the moment of hashing the file it still in use (I don't know exactly why), and
Files.exists()
returns false as per specification (Files.notExists()
would also return false in this case).Proposal: if we get
ENTRY_CREATE
event for a file, but can't hash it, still report theCREATE
event without updatingpathHashes
. An additionalFiles.notExists()
check could also be employed to distinguish between "file has already been deleted" and "file exists but couldn't be accessed" situations.