radv: Handle failing to create .cache dir.
[mesa.git] / src / amd / vulkan / radv_meta.c
index 0acffbc5ccd0dce09e1e3d9710dbc7230d7eb0a7..6d2f24d148f3a9de267f15569e1bd36d8435b6c4 100644 (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);