Skip to content

iter_data_dirs doesn't consider all site dirs #377

@flaviut

Description

@flaviut

For background, I'm working on NixOS, which has a really long $XDG_DATA_DIRS that includes about a dozen /nix/store/... paths, as well as

  • /data/user/.nix-profile/share
  • /nix/profile/share
  • /data/user/.local/state/nix/profile/share
  • /etc/profiles/per-user/user/share
  • /nix/var/nix/profiles/default/share
  • /run/current-system/sw/share

With that in mind, iter_data_dirs() and related functions are defined as

def iter_data_dirs():
    yield self.user_data_dir
    yield self.site_data_dir

When it probably should be this, in order to capture all the data directories rather than just the first one:

def iter_data_dirs():
    yield self.user_data_dir
    yield from self._site_data_dirs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions