[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415)
From: |
Darshit Shah |
Subject: |
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415) |
Date: |
Mon, 18 Feb 2019 08:55:25 +0000 |
Darshit Shah commented on a discussion on src/options.c:
> + if (data_home)
> + return data_home;
> +
> +#ifdef _WIN32
> + if ((env = getenv("LOCALAPPDATA")) && *env)
> + data_home = wget_aprintf("%s/wget", env);
> + else
> + data_home = wget_strdup(user_home);
> +#else
> + if ((env = getenv("XDG_DATA_HOME")) && *env)
> + data_home = wget_aprintf("%s/wget", env);
> + else {
> + data_home = wget_aprintf("%s/.local/share/wget", user_home);
> + }
> +#endif
> + mkdir_path(data_home, false);
Of course. The `mkdir_path` here is taken from the existing code. I moved it
into `utils.c`, so that it can be shared here as well.
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/merge_requests/415#note_142198880
You're receiving this email because of your account on gitlab.com.
- Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), (continued)
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), Tim Rühsen, 2019/02/17
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), Tim Rühsen, 2019/02/17
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), Darshit Shah, 2019/02/17
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), Tim Rühsen, 2019/02/17
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), Tim Rühsen, 2019/02/17
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), Darshit Shah, 2019/02/17
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), Darshit Shah, 2019/02/17
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), Tim Rühsen, 2019/02/18
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), Tim Rühsen, 2019/02/18
Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415), Tim Rühsen, 2019/02/18