enthought / envisage

Envisage is a Python-based framework for building applications whose functionalities can be extended by adding "plug-ins".
http://docs.enthought.com/envisage/
Other
81 stars 26 forks source link

Use the correct state location when creating the folder #490

Closed mdickinson closed 1 year ago

mdickinson commented 1 year ago

Inspired by discussion in #489, where @corranwebster observes that:

But there is something a bit dodgy about _initialize_application_home in that it isn't using self.state_location but a hard-coded path instead: if state_location changes after init then you'll end up with this situation.

And indeed _initialize_application_home should depend on self.state_location as the single point of truth for the location; the current code will create the wrong directory in the event that the user passed state_location when creating the application.

This PR fixes that, and adds a regression test.

mdickinson commented 1 year ago

And ... segfault. We still need to skip the new test on PySide6 / Linux. I was optimistically hoping that that wouldn't be the case. (Fixed in c05852e8cedb51c3d400dff3050909f223ff86d8.)