-
Allison Karlitskaya authored
If the XDG_RUNTIME_DIR environment variable is set, we are being told by the OS that this directory exists and is appropriately configured already. In the fallback case of ~/.cache/, however, the directory may not yet exist. Rework the logic of this function a little so that we only check for the environment variable once. If it is not set, we will fall back to the cache directory, and mkdir() it to make sure that it exists. Meanwhile, remove a statement from the reference documentation that promises a warning in this case (which has never been true) and replace it with a statement that applications can rely on the directory existing. This change prevents each user of this API from having to check for the directory for themselves; an example of that can be seen in bug 763274. https://bugzilla.gnome.org/show_bug.cgi?id=763344
7c6141a5