Skip to content

Issue with recreated watches #1

@Dudenman

Description

@Dudenman

Hi Radu,

I have a problem with the libinotifytools in version 3.14, that when a watch is recreated the wrong filename is returned. It seems as if the internal redblack tree would not delete the mapping between a watch descriptor and a filename when a file is deleted and the IN_IGNORED event is sent.
I have come up with a small example to reproduce my scenario on http://pastebin.com/F5rumF6v.
The necessary steps to reproduce are:

-- adjust pathnames in the example and compile --

mkdir test

touch test/test1

-- run the example --

rm -rf test

mkidr test

touch test/abcd [can be arbitrary name] <== wrong output in the example

The example will always produce the correct event but with the wrong filename (one can even do mkdir test/test123 and an event will be returned that the directory was created on the file test/test1).

Regards

Dominik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions