question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[catmod fs] Bring in-line with XDG Base Directory Specification

See original GitHub issue

Describe the current state of the problem Currently, by default, the “Desktop’s file system” catmod uses ~/${author_name}/${project_name} which has the potential to heavily pollute the user’s home directory when ct.js becomes more popular.

Describe the solution you’d like Instead it should follow the XDG Base Directory Specification, which states the following locations should be used for various purposes.

$XDG_DATA_HOME as the base directory for data files. Defaults to ~/.local/share $XDG_CONFIG_HOME as the location for configuration files. Defaults to ~/.config

This part is more subjective, but I do not think the author’s name should be used in the path. Instead a separate “Organization Name” should be created and used in it’s place. It’s conceivable that in some organizations, there is not one specific author, but for indie development, I believe a lot of people would have the two be separate.

For an example. If I published a game called Vroom under a Organization called Ursid I would expect the data and config directories to likely be as follows: ~/.local/share/ursid/vroom/ ~/.config/ursid/vroom/

Describe alternatives you’ve considered (optional) I do not think that there is any good alternative to using the specification, however I can see the separation of author and organization being rejected. However if it does, I would suggest renaming it to “developer name”.

Additional context I have no idea if MacOS follows the specification and I would be surprised if Windows did. This is mainly for Linux.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JulianWebbcommented, Aug 23, 2020

I may have accidentally broken my branch with git. I’ll need to fix it before PR

Edit: Nope, I just forgot which branch I was using.

0reactions
naturecodevoidcommented, Aug 23, 2020

I can test on windows and Mac.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XDG Base Directory Specification
This specification defines where these files should be looked for by defining one or more base directories relative to which files should be ......
Read more >
XDG Base Directory - ArchWiki
Application Legacy Path Supported Since ALSA ~/.asoundrc 577df36 · 1.2.3 Android Studio ~/.AndroidStudioX.X Android Studio 4.1 Anki ~/Anki , ~/Documents/Anki
Read more >
[Feature Request] Use The XDG Base Directory Specification
This directory is defined by the environment variable $XDG_DATA_HOME . There is a single base directory relative to which user-specific ...
Read more >
259356 - Support for the Freedesktop.org XDG Base Directory ...
The XDG Base Directory Specification is based on the following concepts: There is a single base directory relative to which user-specific data files...
Read more >
what is the XDG base directory specification ... - YouTube
today I talk about the XDG base directory specification and how an application might go about adhering to it (as well as some...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found