Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: App data in non-standard location #459

Open
probablykasper opened this issue Jan 16, 2023 · 7 comments · May be fixed by #498
Open

BUG: App data in non-standard location #459

probablykasper opened this issue Jan 16, 2023 · 7 comments · May be fixed by #498

Comments

@probablykasper
Copy link

Describe the bug
DbGate is storing app data in ~/.dbgate on macOS, which goes against macOS guidelines.

This can be migrated fairly easily:
If settings.json does not exist in the new location, move over the files from ~/.dbgate if it exists

Expected behavior
App data should be stored in ~/Library/Application Support/dbgate. You can use app.getPath('userData') to get ahold of it.

Version Information (please complete the following information):

  • OS: macOS
  • App Version: 5.2.1
  • Install source: installer
@ProjectInfinity
Copy link
Collaborator

Do you happen to have a link to said macOS guidelines?

@janproch
Copy link
Member

You are right.

On the other side, there are many other software, which uses the same convention for user data directory location (eg. .vscode, .yarn, .node)

Does this cause any problems?

Now the location is the same for all platforms (windows, mac, linux), and also in Docker. I guess in Windows also will point somewhere into AppData directory (but also in Windows, there are many programs, which use the same convention as DbGate).

I am not sure, whether it's worth it, to make this change, which brings quite high risk, because of many supported platforms.

@probablykasper
Copy link
Author

@probablykasper
Copy link
Author

On the other side, there are many other software, which uses the same convention for user data directory location (eg. .vscode, .yarn, .node)

Many developer tools do, .apps very rarely do.

Does this cause any problems?

  1. I think it's a problem to have many different potential places that one app stores data. Just to delete one app's folder, you may need to look in ~/Library/Application Support, ~ and ~/.local. That's not a great user experience imo. Especially since DbGate already stores data in ~/Library/Application Support/dbgate, so I wouldn't expect it to have app data also stored in another folder.

  2. Uninstall tools (including the one I use) may not recognize ~/.dbgate, so the folder is left behind, unnecessarily taking up space.

  3. It's messy because it stores data at a folder level that doesn't make sense. The home folder is a collection of categories.

Now the location is the same for all platforms (windows, mac, linux), and also in Docker. I guess in Windows also will point somewhere into AppData directory (but also in Windows, there are many programs, which use the same convention as DbGate).

I don't really get this point. Sounds great for the developer, but I can't see how it makes sense for users. Operating systems are different, and require different handling.

@ProjectInfinity
Copy link
Collaborator

@ProjectInfinity Yes, these are the relevant ones: File System Basics: The Library Directory Stores App-Specific Files macOS Library Directory Details

Thanks.

After reading I agree with @janproch I think the changes required outweigh the usefulness of this.

Uninstall tools (including the one I use) may not recognize ~/.dbgate, so the folder is left behind, unnecessarily taking up space.

I actively use dbgate for work and this is the size of my directory, I think it is an acceptable trade off.

du -lsh .dbgate/
58M     .dbgate/

I don't really get this point. Sounds great for the developer, but I can't see how it makes sense for users. Operating systems are different, and require different handling.

In the end I think developer convenience in this event takes precedent over saving some megabytes on a user's drive.
DbGate is after all a cross platform application and you're unlikely to have every OS/DE design/guidelines followed by any cross platform application and adding cases for each platform and their derivatives is a lot of effort.

@probablykasper
Copy link
Author

In the end I think developer convenience in this event takes precedent over saving some megabytes on a user's drive.

In my case it's actually a pretty significant 516MB. Is the developer convenience having to deal with the migration, or is it communicating with users in issues?

DbGate is after all a cross platform application and you're unlikely to have every OS/DE design/guidelines followed by any cross platform application and adding cases for each platform and their derivatives is a lot of effort.

In my opinion, just because other apps are bad at following platform standards isn't a good reason to ignore the standards. I think we should all do our best

I've never actually seen a GUI app store data where DbGate does, because frameworks like Electron have APIs to deal with it

@probablykasper probablykasper linked a pull request Feb 18, 2023 that will close this issue
@janproch
Copy link
Member

Similar task was already solved is issue #248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants