wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415)


From: Tim Rühsen
Subject: Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415)
Date: Mon, 18 Feb 2019 08:52:41 +0000

Tim Rühsen 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);

I indeed was confused, thanks for explaining.

We already have code that creates paths. Any chance to use the new function 
there as well ? Or otherwise reduce code duplication ?

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/merge_requests/415#note_142197833
You're receiving this email because of your account on gitlab.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]