Skip to content

Releases: adrg/xdg

v0.5.3

31 Oct 16:51
aa865a5
Compare
Choose a tag to compare

Changelog

  • Updated xdg.SearchRuntimeFile to also look in the operating system's temporary directory for runtime files.
    This covers unlikely cases in which runtime files cannot be written relative to the base runtime directory either because it does not exist or it is not accessible, so xdg.RuntimeFile suggests the operating system's temporary directory as a suitable fallback location.

Internal

  • Improved package testing.

v0.5.2

29 Oct 13:43
2335a68
Compare
Choose a tag to compare

Changelog

  • Updated logic of xdg.RuntimeFile: due to the special nature of the runtime directory, the function no longer attempts to create it if it does not exist. If that's the case, the function uses the operating system's temporary directory as a fallback. The function still creates subdirectories relative to the base runtime directory or its fallback.

    Justification: the creation of the runtime directory is not in the scope of this package as it has special requirements defined by the XDG Base Directory Specification. Relevant excerpt:

    The lifetime of the directory MUST be bound to the user being logged in. It MUST be created when the user first logs in and if the user fully logs out the directory MUST be removed. If the user logs in more than once they should get pointed to the same directory, and it is mandatory that the directory continues to exist from their first login to their last logout on the system, and not removed in between. Files in the directory MUST not survive reboot or a full logout/login cycle.

    Also, on Linux, the parent directories of the default user runtime directory are owned by the root user so they cannot be created by a regular user. pam_systemd is usually responsible for creating the runtime directory (/run/user/$UID).

v0.5.1

17 Oct 12:34
Compare
Choose a tag to compare

Changelog

  • Added support for the non-standard XDG_BIN_HOME base directory.
    See XDG base directories README section for more details.
  • Added more config and data search locations on macOS.
    • Added ~/.config at the end of the list of default locations for XDG_CONFIG_DIRS.
    • Added ~/.local/share at the end of the list of default locations for XDG_DATA_DIRS.
  • Added more application search locations on Windows:
    • %ProgramFiles%
    • %ProgramFiles%\Common Files
    • %LOCALAPPDATA%\Programs
    • %LOCALAPPDATA%\Programs\Common

Internal

  • Updated golang.org/x/sys dependency to the latest version.
  • Improved package testing.

v0.5.0

08 Jul 20:50
Compare
Choose a tag to compare

Changelog

  • user-dirs.dirs config file is now parsed on Unix-like operating systems (except for macOS and Plan 9).
    See XDG user directories README section for more details.
  • Updated golang.org/x/sys dependency to the latest version.

Internal

  • Moved all path related functionality in internal pathutil package.
  • Added internal userdirs package:
    • Moved xdg.UserDirectories to userdirs.Directories.
    • Added parsing functions for user-dirs.dirs config file.
  • Improved package testing.

v0.4.0

27 Oct 13:29
Compare
Choose a tag to compare

Changelog

Windows

  • Added support for Known Folders.
    Appropriate folders are now used as defaults for XDG environment variables which are not set.
  • Added more search directories for config files.
  • Added more search directories for applications.
  • The fallback path for templates is now %APPDATA%\Microsoft\Windows\Templates instead of the legacy %USERPROFILE%\Templates path.

See https://github.com/adrg/xdg#default-locations for more details.

Internal

  • Code coverage is now 100%.
  • Improved package structure.
  • Improved documentation.

v0.3.4

08 Sep 12:23
Compare
Choose a tag to compare

Changelog

v0.3.3

07 Apr 17:45
Compare
Choose a tag to compare

Changelog

  • Added workaround for os.Stat bugs on Windows, described by issues golang/go#33357, microsoft/Windows-Containers#97 and golang/go#34900. On some Windows versions, os.Stat returns an error for valid socket files and for symbolic links to directories.
  • Enabled build for the js/wasm architecture
  • Minor internal refactoring
  • Improved testing

v0.3.2

10 Mar 20:43
ecf63cb
Compare
Choose a tag to compare

Changelog

  • Added Plan 9 support
  • Improved documentation

v0.3.1

22 Feb 16:24
b9ccb1f
Compare
Choose a tag to compare

Changelog

  • The default value for the XDG_CONFIG_HOME environment variable on macOS systems has been
    changed from ~/Library/Preferences to ~/Library/Application Support.
  • The default value for the XDG_CONFIG_DIRS environment variable on macOS systems has been
    changed from [/Library/Preferences] to [~/Library/Preferences, /Library/Application Support, /Library/Preferences].

See more details regarding the change in PR #13.

NOTE: the package will still find config files placed relative to the ~/Library/Preferences directory.
However, if XDG_CONFIG_HOME is not set, it will suggest saving config files relative to the ~/Library/Application Support directory.

v0.3.0

13 Jan 19:41
Compare
Choose a tag to compare

Changelog