mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
util/disk_cache: fix ~/.cache/ permissions
XDG Base Dir spec [1] says:
> If, when attempting to write a file, the destination directory is
> non-existent an attempt should be made to create it with permission
> `0700`. If the destination directory exists already the permissions
> should not be changed.
[1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4103
Fixes: 87ab26b2ab ("glsl: Add initial functions to implement an on-disk cache")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23952>
This commit is contained in:
parent
384c8677f5
commit
e32cb99dcb
1 changed files with 1 additions and 1 deletions
|
|
@ -124,7 +124,7 @@ mkdir_if_needed(const char *path)
|
|||
}
|
||||
}
|
||||
|
||||
int ret = mkdir(path, 0755);
|
||||
int ret = mkdir(path, 0700);
|
||||
if (ret == 0 || (ret == -1 && errno == EEXIST))
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue