Closed jmechnich closed 4 months ago
This conditional here
https://github.com/nextcloud/logreader/blob/0a97cbc3b18dbc8e229b972909df09e3e235d6bf/lib/Log/LogIterator.php#L93-L97
could possibly be replaced by just seeking one byte before EOF to cut off the final newline:
In LogIterator::rewind()
: fseek($this->handle, -1, SEEK_END);
Not sure how reliable this assumption is though.
Added some changes to make the tests pass, please verify that things are still working as expected for you.
could possibly be replaced by just seeking one byte before EOF to cut off the final newline: In LogIterator::rewind(): fseek($this->handle, -1, SEEK_END);
I think the current approach is more reliable
Added some changes to make the tests pass, please verify that things are still working as expected for you.
Looks good, thanks! 👍
/backport to stable29
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
Fixes nextcloud/logreader#1236.