IronCoreLabs / ironhide

Tool to easily encrypt and decrypt files to users and groups. Similar to GPG, but usable at scale.
GNU Affero General Public License v3.0
46 stars 6 forks source link

File operations return Ok even when all operations fail #87

Closed giarc3 closed 1 year ago

giarc3 commented 1 year ago

When using ironhide, I'd like it to be very clear when operations fail. Since file operations support partial failure, we currently just log the failures and process the successes and move on. In the case where all operations have failed, I think it would be better to return an error code so it's clear that it was a total failure.

This could be done by changing util::act_on_all_files to return a Result<(), String> and returning Err when there are no successes.