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

Support the ' XDG' specification by not putting anything in the root of $HOME #324

Open
ghost opened this issue Jan 20, 2019 · 5 comments
Open

Comments

@ghost
Copy link

ghost commented Jan 20, 2019

Hiya

It seems my Oolite installation on Linux creates ~/.Oolite. This is not tidy! Why not use instead - as I believe a specification called XDG asserts (see e.g. this Firefox bug report) - ~/config/Oolite?

@TimoWilken
Copy link

Looking in ~/.Oolite, it stores addons and logs. These seem to fit better in XDG_DATA_HOME ("user-specific data files") instead of XDG_CONFIG_HOME ("user-specific configuration files").

In that case, the correct path is given by:

  1. ${XDG_DATA_HOME}/Oolite, if the XDG_DATA_HOME environment variable is set
  2. ~/.local/share/Oolite if XDG_DATA_HOME is not set (note the dot!)

Alternatively, are there GNUstep-specific directories that should be used instead?

There might need to be some logic to detect if ~/.Oolite exists and to use it instead if it does -- or is it a good idea to move ~/.Oolite to one of the above directories automatically?

As only two places in the code use ~/.Oolite (the logger and the addon manager), this seems like a fairly simple fix. I could try and make a pull request (though I don't really know Objective-C, so it might take some time).

@VorpalBlade
Copy link

In addition it seems oolite litters file not just in a dot-directory, but also in a visible directoy called "GNUstep". This absolutely should never happen.

~ $ tree GNUstep/
├── Defaults
│   ├── .lck
│   └── oolite.plist
└── Library
    ├── ApplicationSupport
    │   └── Oolite
    │       └── ManagedAddOns
    └── Caches
        └── org.aegidian.oolite
            └── Oolite-cache.plist

@HiranChaudhuri
Copy link
Contributor

This GNUstep directory likely comes due to the Apple nature of the project where GNUstep is simply a requirement.
Can this library run from other directories at all?

@VorpalBlade
Copy link

This GNUstep directory likely comes due to the Apple nature of the project where GNUstep is simply a requirement. Can this library run from other directories at all?

That seems largely irrelevant? The program (or library) should conform to the platform native conventions for each platform. I.e. XDG on Linux, AppData on Windows, and whatever it happens to be on Mac (I believe they too use a directory, but it has been over a decade and a half since I last touched a mac, so I don't remember exactly).

The GNUstep directory seems wildly non-conforming on all platforms.

@cim--
Copy link
Member

cim-- commented Apr 9, 2024

https://mediawiki.gnustep.org/index.php/Report_Bugs has instructions for reporting issues to the GNUStep library - that bit isn't something which can be fixed within Oolite.

Moving ~/.Oolite to a more standardised default location (while continuing to support the existing one if it's already been created) could be done locally, yes.

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

4 participants