Toqozz / wired-notify

Lightweight notification daemon with highly customizable layout blocks, written in Rust.
MIT License
581 stars 27 forks source link

Implemented proper error handling for socket removal #124

Closed xero-lib closed 8 months ago

xero-lib commented 9 months ago

Solution to #112, where wired would panic without proper explanation after attempting to remove the existing socket with missing permissions.

xero-lib commented 9 months ago

Pushed to master since dev appeared stagnant.

Toqozz commented 9 months ago

I have a feeling the right way to fix this may just be to set the permissions to 666 when we create the socket file, so that this isn't an issue at all.

We should probably also allow a config option to override the permissions incase people don't want other users on the system to access the socket, in which case some improved error messaging is still helpful.

Do you want to try tackle that as well?

xero-lib commented 9 months ago

I have a feeling the right way to fix this may just be to set the permissions to 666 when we create the socket file, so that this isn't an issue at all.

We should probably also allow a config option to override the permissions incase people don't want other users on the system to access the socket, in which case some improved error messaging is still helpful.

Do you want to try tackle that as well?

Seems unnecessary, but if that's how you'd rather do it, I could give it a go.

Toqozz commented 8 months ago

It appears that setting those permissions won't even work anyway. Asking users to remove the file manually will have to do.

xero-lib commented 8 months ago

It appears that setting those permissions won't even work anyway. Asking users to remove the file manually will have to do.

Yeah, I was fiddling with it and couldn't get it to work properly. I think this is currently the best solution.