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

Use Freedesktop's XDG User Dirs under linux #518

Open
Cybso opened this issue Mar 24, 2020 · 0 comments
Open

Use Freedesktop's XDG User Dirs under linux #518

Cybso opened this issue Mar 24, 2020 · 0 comments

Comments

@Cybso
Copy link

Cybso commented Mar 24, 2020

From FileAccessServiceImpl.java:

    public File getDefaultDownloadDirectory() throws IOException {
        if (OSUtils.IS_WINDOWS) {
        ....
        }
        // For all other operating systems we return the Downloads folder.
        return new File(getSystemProperty("user.home"), "Downloads");
    }

On Unix systems, this behavior is wrong. Instead, the download directory should be read from "~/.config/user-dirs.dirs":

XDG_DESKTOP_DIR="$HOME/desktop/"
XDG_DOWNLOAD_DIR="$HOME/downloads"
....

This results in the creation of a new directory "Downloads" next to "downloads" on my system.

Alternatively, the download directory should be configurable.

There's also a lib called xdg-java here on Github:
https://github.com/omajid/xdg-java

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

1 participant