Skip to content

Default to XDG_DATA_HOME.#141

Merged
facundoolano merged 16 commits intofacundoolano:mainfrom
aitet:main
May 25, 2022
Merged

Default to XDG_DATA_HOME.#141
facundoolano merged 16 commits intofacundoolano:mainfrom
aitet:main

Conversation

@aitet
Copy link
Contributor

@aitet aitet commented May 23, 2022

Right now a directory in HOME/.rpg is used.
This clutters the HOME directory and makes the program fail if you have the home folder not writable.
Instead the files should be placed in XDG_DATA_HOME.
This will help people keep their home folders clean.

All existing people that have a HOME/.rpg folder will still have their saves.

Copy link
Owner

@facundoolano facundoolano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds reasonable (ideally the data dir should be customizable by environment vars but no need to do that as part of this PR). Do you mind updating data dir references in the doc and adding an entry to the changelog?

@facundoolano
Copy link
Owner

the build broke btw

@aitet
Copy link
Contributor Author

aitet commented May 25, 2022

the build broke btw

Weird. It should work. The only thing I could think of is that $XDG_DATA_HOME is not set and .local/share/ does not exist on the ubuntu system. I don't really know how to resolve this.

I tested it on a test user and it gave me the same error. Only happens when .local/share does not exist.

@aitet
Copy link
Contributor Author

aitet commented May 25, 2022

I made it so if .local/share/ does not exist then just create $HOME/.rpg

Copy link
Contributor Author

@aitet aitet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good!

@facundoolano facundoolano merged commit 04169a2 into facundoolano:main May 25, 2022
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 this pull request may close these issues.

2 participants