mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 09:57:34 +00:00
io_utils: use mp_mkostemps instead of mkstemp
This commit is contained in:
parent
b647201795
commit
5c2918b4f3
@ -63,7 +63,7 @@ bool mp_save_to_file(const char *filepath, const void *data, size_t size)
|
||||
|
||||
bool result = false;
|
||||
char *tmp = talloc_asprintf(NULL, "%sXXXXXX", filepath);
|
||||
int fd = mkstemp(tmp);
|
||||
int fd = mp_mkostemps(tmp, 0, O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
goto done;
|
||||
FILE *cache = fdopen(fd, "wb");
|
||||
|
Loading…
Reference in New Issue
Block a user