Skip to content

tldr --list ingnores language-specific cache directories #238

Closed
@frenzymadness

Description

@frenzymadness

The problem is on this line:

path = get_cache_dir() / 'pages' / platform

I think that if a language is explicitly set, tldr should use its cache directory.

For example:

# LANG=zh_CN tldr lspci
…
# LANG=cs_CZ tldr cd
…
# ls -la /root/.cache/tldr/
total 0
drwxr-xr-x. 4 root root 56 Mar  4 12:30 .
drwxr-xr-x. 3 root root 48 Mar  4 12:25 ..
drwxr-xr-x. 3 root root 36 Mar  4 12:30 pages.cs
drwxr-xr-x. 3 root root 34 Mar  4 12:25 pages.zh

# LANG=zh_CN tldr --list
[]
# LANG=cs_CZ tldr --list
[]

I'm using the latest release.

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