ad-oliviero / uwufetch

A meme system info tool for Linux, based on nyan/uwu trend on r/linuxmasterrace.
GNU General Public License v3.0
737 stars 48 forks source link

check open file before close() for host_model_info #159

Closed 4zv4l closed 2 years ago

4zv4l commented 2 years ago

I changed the check before close() the file (because before if the file wasn't open it would still try to close() it which seg fault). But then I realised if the first file succeeded to be opened then it wouldn't close it so I changed the check to make it close either if the first or second try succeeded