GNU bug report logs -
#47790
27.2; XDG_DATA_HOME evaluation in move-file-to-trash
Previous Next
Reported by: Thierry Volpiatto <thievol <at> posteo.net>
Date: Thu, 15 Apr 2021 08:06:01 UTC
Severity: normal
Tags: notabug
Found in version 27.2
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 47790 <at> debbugs.gnu.org (full text, mbox):
> From: Thierry Volpiatto <thievol <at> posteo.net>
> Date: Thu, 15 Apr 2021 10:05:04 +0200
>
>
> In `move-file-to-trash` there is this code:
>
> (or (getenv "XDG_DATA_HOME")
> "~/.local/share")
>
> If XDG_DATA_HOME is not set getenv returns nil and that's fine, if
> XDG_DATA_HOME is set to a file path this path is returned and it's fine
> as well, however if user follow recommendations of
> https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html
> and set XDG_DATA_HOME to "$HOME/.local/share" then the above block will
> return this value from getenv which is wrong, `substitute-in-file-name`
> should be used here.
>
> (setenv "XDG_DATA_HOME" "$HOME/.local/share")
Is this a valid setting of an environment variable? IOW, are values
of environment variables allowed to reference other environment
variables, and thus are applications required to recursively expand
the values of environment variables until no references are left?
And, as a corollary, does it mean that '$' in file names are not
supported by environment variables whose values are file names?
This bug report was last modified 4 years and 89 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.