From 9f86183f50b4659013d9731b8cfa604fac2b79f4 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sat, 23 May 2020 02:26:04 +0200 Subject: [PATCH] radv: Handle failing to create .cache dir. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Reviewed-by: Samuel Pitoiset Part-of: (cherry picked from commit cd61f5234d2c275b21c249fc2effc058a74ecf0a) --- .pick_status.json | 2 +- src/amd/vulkan/radv_meta.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d31dd0d4c41..d5cacff3fe5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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" }, diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c index 448a6168bd2..de2f85148a6 100644 --- a/src/amd/vulkan/radv_meta.c +++ b/src/amd/vulkan/radv_meta.c @@ -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);