auanasgheps / snapraid-aio-script

The definitive all-in-one SnapRAID script on Linux. Diff, sync, scrub are things of the past. Manage SnapRAID and much, much more!
GNU General Public License v3.0
225 stars 36 forks source link

bugfix chk_updated function to correctly check if UPDATED_COUNT var is 0 #106

Closed selfishbrat closed 1 month ago

selfishbrat commented 1 month ago

Bug: on master, if UPDATE_COUNT is 0 but UP_THRESHOLD is set to 0, the if statement never triggers, leading to the snapraid commands not continuing.
Bugfix on chk_updated function to allow if statement [ "$UPDATE_COUNT" -eq 0 ] to trigger even if UPDATE_COUNT is not less than UP_THRESHOLD var. This allows the script to continue if there are 0 updates, even if UP_THRESHOLD is set to 0. This is the same logic already in chk_del lines 454-456. :)

selfishbrat commented 1 month ago

apologies, going to request a PR to dev, not to master.