[Merge] ~dbungert/update-notifier:lp-1926298 into update-notifier:master

Dan Bungert daniel.bungert at canonical.com
Wed Apr 28 19:09:47 UTC 2021


Laney, Sebastien, thanks for the reviews.
                                                                                                                                        
> g_auto
I'm a glib noob and more than happy to get such feedback.  I've incorporated                                                            
this.

> That would have avoided the initial bug.                                                                                              
I want to quibble on this point.  g_auto also has the same requirement that
goto out has, that the variables be declared early in the function and that
they be initialized.  Another version of the crash fix is to move the
declaration of pathdirs up to the top of the function and set to NULL, and
g_auto has the same requirement, so the bug would be present with or without
g_auto based on the variable declaration location.

That said, I'd still rather use g_auto than goto, now that I know about it.

> g_file_test logic is 'any'
Again, great feedback, fixed.

> racy
I think the entire feature is racy.  We check for the executable, dialog prompt
the user, and then if the user clicks a button we may call the executable.
During the dialog time the executable can absolutely disappear but I'm not sure
we can do anything about that.  Let me know if you see something else I'm
missing.
-- 
https://code.launchpad.net/~dbungert/update-notifier/+git/update-notifier/+merge/401901
Your team Ubuntu Core Development Team is subscribed to branch update-notifier:master.



More information about the Ubuntu-reviews mailing list