radv: fix regression with builtin cache

If the ~/.cache dir already exists continue on without failing.

Fixes: cd61f5234d ("radv: Handle failing to create .cache dir.")

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5249>
(cherry picked from commit e843303d6f)
This commit is contained in:
Timothy Arceri 2020-05-29 17:02:24 +10:00 committed by Eric Engestrom
parent 094668b7cc
commit a4902d6b4b
2 changed files with 2 additions and 2 deletions

View file

@ -3271,7 +3271,7 @@
"description": "radv: fix regression with builtin cache",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "cd61f5234d2c275b21c249fc2effc058a74ecf0a"
},

View file

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