pyinotify
pyinotify copied to clipboard
Don't you get null bytes from this method?
See: https://github.com/seb-m/pyinotify/blob/master/python3/pyinotify.py#L1236
What do you do about the null bytes which can be returned?
I mean, when a filename equals "test" the bytearray length containing the string will be 16 for example. If you then unpack it you will end up with
b'test\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
If you decode that to a string you will end up with:
'test\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
as a string.