davidmoreno / onion

C library to create simple HTTP servers and Web Applications.
http://www.coralbits.com/libonion/
Other
2.01k stars 250 forks source link

Two patches to improve onion_shortcut_rename #279

Closed nashidau closed 3 years ago

davidmoreno commented 3 years ago

Hi,

I saw an error, could you fix it? then I will just accept the patch.

Thanks!

nashidau commented 3 years ago

Can you be more specific? Master builds with the changes.

The first patch adds | O_TRUNC to the open options. The second reverses the order that source & destination. View them individually and it's much clearer, the merged diff is a little weird.

davidmoreno commented 3 years ago

Hi,

on shortcuts.c:382 you assign fd_orig, but on 383 check fd_dest. I think this bug was there before.

All the rest sound good to me.

nashidau commented 3 years ago

Yes it was there before ;-) I've got a new commit for it, I'll send it by itself if you want to land these first? /me hates github pull requests

davidmoreno commented 3 years ago

Thanks! Merged!