jetperch / pyjoulescope_ui

Joulescope graphical user interface
https://www.joulescope.com
Apache License 2.0
75 stars 23 forks source link

Defer data directory creation. #266

Closed mliberty1 closed 1 month ago

mliberty1 commented 2 months ago

UI version

1.1.6

Your idea

The Joulescope UI automatically creates the default data directory:

https://github.com/jetperch/pyjoulescope_ui/blob/59b6b44ffbb3e28e092265547040c8a89c6e93d5/joulescope_ui/pubsub.py#L446

However, the user can change the data directory. Some users may not want a "Documents" directory, which the UI currently creates at start.

While this does not at all affect the Joulescope UI performance, it will create the Documents directory at start. Most users should not care, since the Documents directory is pretty standard across all platforms as of 2024. I don't think Windows and macOS will function right without a Documents directory, so this is likely only an issue with Linux user's who highly customize their system. You sound like you have deleted the Documents directory, so this behavior is annoying.

The UI should defer data directory creation. In the case that the data directory is default and not found, it should be created. In the case that the data directory is not the default and not found, it needs to do something meaningful. For save, perhaps it reverts to the default and creates that directory? For read, perhaps default to the Documents directory or the user directory?

See the forum.

mliberty1 commented 1 month ago

Fixed in 1.1.7.