radv: Handle failing to create .cache dir.

Fixes: f4e499ec79 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>
(cherry picked from commit cd61f5234d)
This commit is contained in:
Bas Nieuwenhuizen 2020-05-23 02:26:04 +02:00 committed by Eric Engestrom
parent 167d4a5993
commit 9f86183f50
2 changed files with 3 additions and 2 deletions

View file

@ -877,7 +877,7 @@
"description": "radv: Handle failing to create .cache dir.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "f4e499ec79147f4172f3669ae9dafd941aaeeb65"
},

View file

@ -262,7 +262,8 @@ radv_builtin_cache_path(char *path)
strcpy(path, pwd.pw_dir);
strcat(path, "/.cache");
mkdir(path, 0755);
if (mkdir(path, 0755))
return false;
ret = snprintf(path, PATH_MAX + 1, "%s%s%zd",
pwd.pw_dir, suffix2, sizeof(void *) * 8);