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

Data directory seems baked-in to the directory where you compiled the app, and can't be changed #14

Open
jim-collier opened this issue May 3, 2024 · 0 comments

Comments

@jim-collier
Copy link

The data directory location should be easily user-configurable and changeable, e.g. via CLI flag, and/or a config file such as ~/.config/typon.conf. But it doesn't seem to be.

I always compile applications in /tmp, so that cruft doesn't build up. Which gets deleted after every reboot. After realizing the data directory got created under that temporary git project directory for some weird reason, I copied the following data to ~/.local/share/typon/ before my next reboot:

  • quotes/
  • gsave.txt
  • psave.txt
  • stats.txt

But I can't get /usr/local/bin/typon to use this location. And the application fails after /tmp is cleared.

I've tried running typon while in that new data directory as the current directory; that doesn't work.

I've also tried running typon -path ~/.local/share/typon just in the unlikely case that's a thing typon understands; it doesn't seem to. (typon -path still returns the now non-existent path it insist on trying to use.)

I can't find a user or system-wide typon config file that defines that path anywhere. Not anywhere under my user folder (named anything with "typon" or "ihsuy" in it), not anywhere under /etc, /usr, /var.

I've searched the source code to see if I can figure out how it's handling the path for those things (I'm sure that's figure-out-able, but I can't seem to.) I've found variables for storing them in save_handler[c|h]pp but not how they are set. It seems like I'm missing how/when/where the variable my_addr gets set.

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

No branches or pull requests

1 participant