bergware / dynamix

51 stars 38 forks source link

Fix Automatic Checksums - Don't exclude everything when nothing is set to be excluded. #81

Closed Torqu3Wr3nch closed 1 year ago

Torqu3Wr3nch commented 1 year ago

Resolves Issue #80.

Swapped out !empty for isset on exclusion array. isset returns true for an empty string.

As the code was written, you were stuck with blanket/wildcard exclusions even when you didn't want to exclude anything at all.

I have tested in my development environment, but please feel free to double check.

Torqu3Wr3nch commented 1 year ago

Result of ps aux | grep inotify (with no excluded folders) and automatic file hashing enabled:

Before: inotifywait -dsrqo /var/run/hash.pipe -e close_write --exclude ^/mnt/disk[0-9]+/(.*/|.*$|/) --format %w%f /mnt/disk1

After: inotifywait -dsrqo /var/run/hash.pipe -e close_write --exclude '' --format %w%f /mnt/disk1

bergware commented 1 year ago

Thanks