radv: fix regression with builtin cache
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 29 May 2020 07:02:24 +0000 (17:02 +1000)
committerMarge Bot <eric+marge@anholt.net>
Sat, 30 May 2020 04:01:28 +0000 (04:01 +0000)
If the ~/.cache dir already exists continue on without failing.

Fixes: cd61f5234d2c ("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>

src/amd/vulkan/radv_meta.c

index 6d2f24d148f3a9de267f15569e1bd36d8435b6c4..f0156829526589e333b90d6bdc1f755de7d271a9 100644 (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",