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: Darshit Shah
Subject: Re: [Wget-dev] wget2 | Follow XDG Base Directory Specification (!415)
Date: Sun, 17 Feb 2019 12:01:33 +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);

Agreed. I simply replicated my existing directory structure. The reason for 
doing this is that we can have a common location for `.wgetrc` and `.wget2rc`.

More importantly, since we support `include` directives in `.wget2rc`, it makes 
sense to allow the user to keep all their files in one location. Personally, I 
tend to include my `wgetrc` within `wget2rc` and this makes that a lot more 
cleaner.

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


reply via email to

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