less: Do not trust st_size if it equals zero
Fix for less(1) not being to operate on files residing in pseudo-filesystems that advertize a zero size value.
Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276133
We usually want contrib to be merged upstream first.
We usually want contrib to be merged upstream first.
Fix merged upstream: https://github.com/gwsw/less/pull/468
Thank you for tracking this, @ricardobranco777
as soon as they make a new release, we'll import it into our vendor/less branch: https://cgit.freebsd.org/src/log/?h=vendor/less
CC @delphij
Specifically, should we import, or just cherry-pick the patch...
This isn't in v643, but is in v653 (https://github.com/gwsw/less/commit/1fafd968b48e5cea6c85f126d77071a8de707a55 shows it there), but isn't in the release notes. v653 is in beta testing right now, so once it's official, @delphij will important it and we'll close this... Reading the tea leaves suggests this will be soon enough that cherry-picking the change isn't needed, but I'll reevaluate next time I do a deep scrub of the PRs (just before BSDcan most likely).
Thanks for the PR. I'll commit this to vendor branch and merge this one. git will be able to handle it properly for future imports.
Merged as cae336280b0d