On Wed, Feb 4, 2015 at 1:52 PM, Carl Worth wrote:
> - snprintf(cache->path, sizeof cache->path,
> -"%s/.cache/mesa", pwd.pw_dir);
> + cache->path = strdup(path);
> + if (cache->path == NULL) {
> + free (cache);
No space after the function name.
> + cache = NULL;
> +
With this patch, there are now three different options for the shader
cache directory, (considered in order until the first variable is
set):
$MESA_GLSL_CACHE_DIR
$XDG_CACHE_HOME/mesa
/.cache/mesa
Also with this patch, once the desired path is determined, the
directory is